[algogeeks] Re: PAIR of shortest paths...

2006-10-30 Thread Dhyanesh (ધયાનેશ)
Djikstra's or any other single-source shortest path algorithm should be good enough I guess.-DhyaneshOn 10/30/06, vijay [EMAIL PROTECTED] wrote:Anyone know how to solve this problem... http://acmicpc-live-archive.uva.es/nuevoportal/data/problem.php?p=3502...I thk its a toughie...

[algogeeks] PAIR of shortest paths...

2006-10-30 Thread vijay
Anyone know how to solve this problem... http://acmicpc-live-archive.uva.es/nuevoportal/data/problem.php?p=3502 ... I thk its a toughie... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To

[algogeeks] Re: Give an Optimal Allocation Algorithm for the described problem.

2006-10-30 Thread [EMAIL PROTECTED]
Knap sack algorithm works well when 'M' is small. I think this a NP problem. --~--~-~--~~~---~--~~ 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

[algogeeks] Re: PAIR of shortest paths...

2006-10-30 Thread Pradeep Muthukrishnan
I dont see how Djikstra can be used here?On 10/30/06, Dhyanesh (ધયાનેશ) [EMAIL PROTECTED] wrote: Djikstra's or any other single-source shortest path algorithm should be good enough I guess. -DhyaneshOn 10/30/06, vijay [EMAIL PROTECTED] wrote:Anyone know how to solve this problem...

[algogeeks] Re: PAIR of shortest paths...

2006-10-30 Thread Dhyanesh (ધયાનેશ)
Why not .. it is a graph with edge weights = 1. In fact we can even just use BFS to solve this problem. I will try and submit a solution and see if what I am thinking is right.-Dhyanesh On 10/30/06, Pradeep Muthukrishnan [EMAIL PROTECTED] wrote: I dont see how Djikstra can be used here?On

[algogeeks] Re: PAIR of shortest paths...

2006-10-30 Thread Karthik Singaram L
I am not sure If I got the question right 1 4 0 3 1 2 3 1 1 0 2 2 0 3 3 2 0 2 1 2 Isn't the answer that camarade 1 talks to camarade 0 who inturn talks to 2. Isnt this shortest path algorithm? isnt Djikstra O(VlogV) which seems feasible for the problem rite? On 10/30/06, Pradeep

[algogeeks] Re: PAIR of shortest paths...

2006-10-30 Thread Dhyanesh (ધયાનેશ)
I just submitted a solution which uses BFS and passes the judge cases. So it is indeed a shortest path problem. Using Djistra's would be fine too, but as it is here the edge weights are just 1 so BFS works.-Dhyanesh On 10/30/06, Karthik Singaram L [EMAIL PROTECTED] wrote: I am not sure If I got

[algogeeks] Re: PAIR of shortest paths...

2006-10-30 Thread Pradeep Muthukrishnan
I am sorry , when I spoke to the author of the post he had mentioned a different question which ishttp://acmicpc-live-archive.uva.es/nuevoportal/contests/contest/index2.php?c=16 problem 2927 in this contest which asks for a pair of shortest paths and so I assumed that he was asking for this

[algogeeks] Fastest hashing algorithm?

2006-10-30 Thread howa
Requirements: A string, size up to 10 MB I want to hash the string (without collosion, into a key with length not longer than 255) currently, I am using md5, I want to ask, are there any better algorithms? --~--~-~--~~~---~--~~ You received this message