Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
There isn't an answer to this one. There are some strategies for doing this with restrained box sizes but the general case you describe isn't actually solvable. At least no one has yet. (of course, there may be some genius out there that just broke NP-complete problems too but...)

I've not heard of anyone solving this or any related 2d or 3d problem.

The balance problem, aka tape-sides is a good simpler example. Given a set of weights (or a set of song lengths) divide them into two sets that have the least difference in weight (length)

There are a lot of nice strategies but they all have nasty cases that don't work. Exaustively trying every case is the only hope. The best bet is to minimize the cases you have to exhaust. Force everything to inch(cm) boundries, move boxes on the same. Pack things around the largest volume item, etc.

Really, not to discourage you too much, it might be a good idea to start on something a bit simpler, like curing cancer. =)

--
$you = new YOU;
honk() if $you->love(perl)


In reply to Re: Packaging Algorithm by extremely
in thread Packaging Algorithm by marius

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others contemplating the Monastery: (7)
    As of 2014-12-25 09:33 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?





      Results (159 votes), past polls