ampbuster Posted January 15, 2011 Share Posted January 15, 2011 Hi guys, I have a problem here: There are 3 beams: 4000mm, 5000mm and 6000mm in length. There are 4 cuts to be made to these beams: 2700mm, 3000mm, 2300mm, 1000mm. The best solution is: 4000mm beam -> 3000mm, 1000mm 5000mm beam -> 2700mm, 2300mm 6000mm beam left untouched Therefore, there is no wastage. Can anyone come up with a solution to find the best way to cut the beams so that there is least wastage? Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted January 15, 2011 Share Posted January 15, 2011 We aren't really here to supply free code on demand. Sounds like homework to me, anyhow. Quote Link to comment Share on other sites More sharing options...
btherl Posted January 19, 2011 Share Posted January 19, 2011 Does the solution have to be better than an exhaustive search? With so few variables an exhaustive search is practical and the simplest way. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.