i think the answer of the question will be constant to if S=sum of length of all the rops , N=number of rops
then total cost will be *S*log(N)*
just make pair of two - two sticks & tie them , repeat it again & again, Explanation of answer:since every time we tie the cost at that level will be S=sum of all the rops, &
we are going to repat the process log(N) times, On 28-03-2011 19:49, Gunjan Sharma wrote:
The question seems to be correct. Think again....On Mon, Mar 28, 2011 at 5:24 PM, kunal srivastav <[email protected] <mailto:[email protected]>> wrote:if you tie all of them and the cost is sum of invidual lengths then in the end the cost will be sum of all lengths irrespective of any order that we tie them in.. i think the ques would req you to say that the cost is the longer of the two..plz check On Mon, Mar 28, 2011 at 12:11 PM, bittu <[email protected] <mailto:[email protected]>> wrote: you are given n ropes,maybe of different length. the cost of tying two ropes is the sum of their lengths.Find a way to tie these ropes together so that the cost is minimum. Thanks Shashank -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected] <mailto:[email protected]>. To unsubscribe from this group, send email to [email protected] <mailto:algogeeks%[email protected]>. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.-- thezeitgeistmovement.com <http://thezeitgeistmovement.com> -- You received this message because you are subscribed to the GoogleGroups "Algorithm Geeks" group. To post to this group, send email to [email protected] <mailto:[email protected]>. To unsubscribe from this group, send email to [email protected] <mailto:algogeeks%[email protected]>. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Regards Gunjan Sharma Chairman IEEE Students Chapter IIT Roorkee B.Tech IV year CSE Contact No- +91 9997767077 --You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group.To post to this group, send email to [email protected].To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
-- Thanks & Regards Rajesh Patidar -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
<<inline: signature.png>>
