Archived

This topic is now archived and is closed to further replies.

"Easy" problem needs a clever solution. Can you give it?

This topic is 5131 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello... I have a little problem, which i want to share with you. Here it is: Assume you have infinite number of identical tubes, all of them 20m. You are permitted to cut as many as you want, in case to produce the following "types" of tubes:
 Type    Length (m)   Number of Tubes Wanted
  1         3                 63
  2        13                 31
  3         8                 47
  4         6                 39
 
What's the minimum number of 20m tubes you must cut, in case to produce the above table? Note: You are permitted to use a leftover part as a main part. E.g. Take a 20m tube, cut one 8m tube from it. Take the leftover part (12m) and cut it to 2 tubes, each one 6m (or 4 -> 3m). So from 1 tube which was 20m, we produced 1 tube 8m, and 2 tubes 6m. If possible, give your solution, through an algorithm. Enjoy... HellRaiZer EDIT : Some corrections [edited by - HellRaiZer on November 28, 2003 5:09:20 PM]

Share this post


Link to post
Share on other sites
My solution...

63 20m tubes cut in the following fashion

31 @ 13 | 6
4 @ 8 | 6 | 6
16 @ 8 | 8 | 3
11 @ 8 | 3 | 3 | 3 | 3
1 @ 8 | 3 | 3 | 3

I couldn''t come up with a equation... so I don''t have any way of proving that this is the best way.


-Shags

Share this post


Link to post
Share on other sites

This topic is 5131 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.