Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re^2: Challenge: Twist On Bin Packing

by bibliophile (Parson)
on Apr 07, 2006 at 15:25 UTC ( #541885=note: print w/replies, xml ) Need Help??

in reply to Re: Challenge: Twist On Bin Packing
in thread Challenge: Twist On Bin Packing

Hmm. I would have taken a different tactic...

Assume that you have an infinite number of standard containers with a given length/width/height. You also have a finite number of items to go in the containers, each item having its own l/w/h (which can be different for each item). The trick then would be to pack items in containers such that each container can hold no more items... but optimizing for empty space.
Order of packing then becomes the issue.

Actual code is left as an exersise for the reader. :-)

-- WARNING: You are logged into reality as root.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://541885]
[choroba]: but gurus say they in fact happen left to right, but we understand them wrongly
[marioroy]: bad gurus :)
[choroba]: also, &> redirects both at the same time
[marioroy]: erix are you using csh
Discipulus uh the link was for cmd.exe the bash one
[marioroy]: If yes, for redirection to work, one might do the following
[marioroy]: `bash -c "clang --version 2>/dev/null"`
[choroba]: Sane people don't use csh
[marioroy]: the 1>&2 will work, not shown
[marioroy]: sorry, did not know which if cmd.exe or unix (bash)

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2017-03-23 08:21 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (284 votes). Check out past polls.