I think the possible solution is :
*Tie the highest two ropes at the end of the rope.*
*
*
This is because of the following reason:
Eg: Rope 1: Size 10 mtr
Rope 2: Size 13 mtr
Rope 3: Size 5 mtr
Rope1--> Rope2--> Rope3 Cost: (10+13) + (13+5) = 41
Rope1-->Rope3--> Rope2 Cost: (10+5) + (5+13) = 33
So the optimum cost is : *1st Highest length Rope + 2*(Length of all other
ropes other that two having the highest size) + 2nd Highest Rope*.
On Mon, Mar 28, 2011 at 7:49 PM, Gunjan Sharma <[email protected]>wrote:
> The question seems to be correct. Think again....
>
>
> On Mon, Mar 28, 2011 at 5:24 PM, kunal srivastav <
> [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]>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].
>>> 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.
>>>
>>>
>>
>>
>> --
>> thezeitgeistmovement.com
>>
>> --
>> 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.
>>
>
>
>
> --
> 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.
>
--
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.