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?
Asked
Active
Viewed 1,215 times
0
-
possible duplicate of http://stackoverflow.com/questions/140406/how-can-i-programmatically-determine-how-to-fit-smaller-boxes-into-a-larger-packa – Paul McMillan Apr 19 '10 at 22:19
-
Reminds me of fitting chars into VRAM on GBA/GBC systems. Same problem, difficult to solve well. – Michael Dorgan Apr 19 '10 at 23:37
-
2Possible duplicate of Tetris :) – mtrw Apr 20 '10 at 00:30
-
duplicate? http://stackoverflow.com/questions/140406/how-can-i-programmatically-determine-how-to-fit-smaller-boxes-into-a-larger-packa – Glennular Apr 19 '10 at 22:17
1 Answers
1
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.

Andrew
- 26,629
- 5
- 63
- 86