[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 3 KB, 225x225, download.jpg [View same] [iqdb] [saucenao] [google]
10377807 No.10377807 [Reply] [Original]

I need to cut a certain number of pieces of different length of lumber beams.
Is there a mathematical approach to know the minimum number of beams required to make all the pieces? And to minimize the wood left?

>> No.10377825

>>10377807
Yes. Calculate the area of the cut you want to make (I'm assuming you're making just flat pieces so you don't need to know the the surface area, just the area of the face), then calculate the area of a standard beam. Take the area of your cut and multiply by the number of cuts you need, then divide by the area of a standard beam.

By the way, as someone that worked in a builder/estimator, it is wise to buy a little extra material to compensate for waste since reality is you won't perfectly use each beam.

>> No.10377851

>>10377807
This problem is NP-hard. See "bin-packing".

>> No.10377897

>>10377807
>>10377807
Here's a better way. Manually find how many cuts you can get out of one standard piece of lumber. Then take the total number of pieces you want to cut and divide by that number (total pcs required ÷ cuts per pc). You get the exact number of beams you need. Obviously you can't really control waste here unless you change up the design to minimize waste per piece of lumber.

>> No.10377908

And fuck you gookmoot, you cocksucking chink faggot. Thanks for the ads and the endless fading captchas you cunt eyed dog eater..

>> No.10378043

This is the knapsack problem.

>> No.10378089

>>10378043
Sounds more like bin packing to me

>> No.10378203

>>10377825
How come you decided to work with the area of the board instead of taking the height of a beam and dividing before rounding down to see how many integer divisions fit into that height?

Wouldn't the outcome be the same?

>>10377807
Take your stock length and divide by desired beam length, rounding down to the nearest number.

Then divide your desired beam number by the number of boards you get from each piece of stock, and round up.

>> No.10378215

>>10377807
OP is fag

>> No.10378417

>>10378203
I chose to work with area because I wasn't sure what cuts you wanted to make. If they are just straight cuts then it's easier for you. Anyway, use this method exact number of boards>>10377897

>> No.10378425

>>10378417
>>10378203 (me)
I am not OP, but I interpreted the wording in such a way that he isn't cutting a panel of plywood but rather straight lengths of 2x4 or whatever.