The Bin Packing problem is an optimization problem. Given a set of items,
If we have items I = {(1, 2), (2, 1), (3, 3), (5, 5)}, and a capacity c=6, we can pack our items optimally in 2 bins with:
- b1 = {2, 5} and b2 = {1, 3}.
In this case neither bin exceeds capacity (b1 is filled 6/6 and b2 is 5/6).
See also the knapsack problem.