views:

97

answers:

2

I've been interested in writing an application that will show how to fit boxes (of random dimensions) in a container so there is as little space as possible left. A real life example would be something that would tell you how to use the most space in a UPS truck. Does anyone know of a good place to start for something like this? Is there an existing algorithm that does something similar to what I'm talking about?

+1  A: 

What you are referring to is a classic computer science problem known as bin packing, it is an NP-Hard defined problem with well known research and heuristics, but ultimately the only way of calculating it absolutely is via computation of every combination possible.

Read up on http://en.wikipedia.org/wiki/Bin_packing_problem

Andrew