This is a problem/brain teaser (my dad asked it as a problem which he encountered earlier from his work).
You have to create a set of 4m and 4.75m pipes from 6m pipes. You can also join/weld two pipes to create a 4m/4.75m pipe (but, there should be only one joint). For example, 2+2 will work, but 1+1+2 will not (because it has 3 joints).
We want to create 108 (let's round it to 100) 4m and 4.75m pipes each. How many do you need to buy the 6m pipes to minimize the wastage?
I tried this approach: Cut two 4m pipes from two 6m pipes. We get 2+2m pipes left. Then we cut 2.75+2.75m pipes from a 6m pipe. Then we can join the 2m and 2.75m to get a 4.75m pipe. Overall wastage would be 0.6m per 2 pieces of 4m and 4.75m pipes. This is a lot of wastage. Is there any other optimal solution to this problem?
My brother also told me that this might be a linear optimization problem (don't know much about that).