[algogeeks] Re: smallest maximum s-t network flow

2006-03-18 Thread SPX2
consider the direction of traversal s-t define critical node as one in wich allot of nodes point to when traversing in the chosen direction. sort critical nodes by nodes pointing to them. eliminate first k critical nodes --~--~-~--~~~---~--~~ You received this

[algogeeks] Re: determine whether a matrix is rearrangeable

2006-03-18 Thread SPX2
its about liniar independence --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to

[algogeeks] Re: determine whether a matrix is rearrangeable

2006-03-18 Thread SPX2
what complexity aj ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to [EMAIL

[algogeeks] Re: MATROID problem !!!!!!!!!

2006-03-18 Thread SPX2
first gcet please do write the problem in a appropriate manner. if you do and we can understand the hypothesis i promise i will document myself on matroids to try to solve it --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[algogeeks] Re: a better way to draw circle using curses

2006-03-18 Thread SPX2
you can always do sumthin like this for i=1 to 360 degrees ,i++ (or i+=0.5 for better precision) draw point at point.x=sin(i)*radius point.y=cos(i)*radius for better drawing you could also choose some adjacent points to the current point..

[algogeeks] Re: may be greedy approach

2006-03-08 Thread SPX2
its actually called backtracking --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to

[algogeeks] Re: Place for discussing innovative software projects?

2006-03-08 Thread SPX2
Be serious...what innovative software are you talking about,give examples.And ppl now are interested in furthere development of existing software...no innovative stuff whatsoever.But if you want you can propose an ideea and if ppl like it mayb they'll join u in developing it

[algogeeks] Re: need help help n help!!!

2006-03-07 Thread SPX2
i believe for the second problem it is enough to sort them using quicksort method in O(nlgn) but retain a vector with initial positions(wich after quicksort is applied will be a permutation vector of the original one). Now you have to find out number of pairs (ai,aj) with ij and ai2aj. Now this

[algogeeks] Re: need help help n help!!!

2006-03-07 Thread SPX2
Finding ah...isnt that simple... you have to do a binary search for it... that means that if you're on step j in the for above...you will have to do (n-j)lg(n-j)computations well...I think it would bring the algorithm to a total of O(sum from j=0 to n of (n-j)lg(n-j) O(n^2lgn) if anyone can

[algogeeks] Re: compression of graph nodes

2006-03-07 Thread SPX2
store in whatever you like,be it father/son vector,vector of double linked lists,matrix of adjacency,whatever.it is true you only have to walk from node 1 to 6 in all the ways possible. Now to do this it is true that you can use what was suggested a depth first search. And what you have to do

[algogeeks] Re: largest Number Smaller Than Given Number

2006-03-07 Thread SPX2
Dhyanesh im not very sure about previous permuatation The question is. Is the prev_permutation() smaller in lexicographic order from the current one ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Algorithm Geeks

[algogeeks] Re: Evaluate an expresion

2006-01-12 Thread SPX2
just consider expression as beeing a treee with the ifs and elses beeing nodes in it... the paranthesis offer a boundary for where to stop and how to continue...actually these are most important for the parsing task you want to do

[algogeeks] Re: FSM generation

2006-01-12 Thread SPX2
try knuth-morris-pratt algorithm or kmp search... aho-corsasick would be better but kmp is easier to understand

[algogeeks] Re: Can someone help me on photon mapping algo

2006-01-12 Thread SPX2
why not use POV-ray ?

[algogeeks] Re: Sum of sub array

2006-01-12 Thread SPX2
im no stranger to algorithms tough i didnt understand nothing from most posts here please try to express yourself better