[ 3 / biz / cgl / ck / diy / fa / g / ic / jp / lit / sci / tg / vr ] [ index / top / reports / report a bug ] [ 4plebs / archived.moe / rbt ]

2017/01/28: An issue regarding the front page of /jp/ has been fixed. Also, thanks to all who contacted us about sponsorship.

/sci/ - Science & Math

View post   

[ Toggle deleted replies ]
File: 3 KB, 225x225, download.jpg [View same] [iqdb] [saucenao] [google] [report]
10377807 No.10377807 [Reply] [Original] [archived.moe]

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

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

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

>> No.10377897

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

Sounds more like bin packing to me

>> No.10378203

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?

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

OP is fag

>> No.10378417

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

>>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.

Name (leave empty)
Comment (leave empty)
Password [?]Password used for file deletion.