OK, For the duration of this question i will use a simple example: You ship stuff in boxes, and you can hold say 100 arbitrary units of space per box (just think in 2 dimensions) all of your units are flexable so we dont have to worry about conflicting shapes either, simple example. You want to sort these items of varying sizes into boxes such that the least amount of boxes are used to ship everything. How (Other than brute forcing each item combonation into each box and praying you find matches) can you accomplish this? Some algorithm? Also these items will eventually change in size over time, so i might have to re-sort the boxes on the fly. Im looking for a relatively fast way to do this all. Any input would be greatly appreciated.