Bin Packing Problem¶
Definition¶
The bin packing problem assigns every item to a container, subject to a common capacity per container, and minimizes the number of containers used. If item has weight and a container has capacity , the weights assigned to each container must sum to at most .
Interpretation¶
Bin packing asks how few containers are needed when items of different weights must be grouped without exceeding a common capacity. The difficulty lies in deciding which items share a container: the number of possible groupings grows very quickly with the number of items.
The figure shows a packing of the four items into containers of capacity . Both containers are filled exactly to , and no packing can use fewer: one container holds at most , while the total weight is .
The constraints have two parts: every item goes whole to exactly one container, and in each container the assigned weights sum to at most . If items could be split, the containers could be filled one after another up to capacity, and the ceiling containers would be enough. This relaxation is why the total-weight bound is a lower bound on the minimum. A heuristic such as first fit builds a feasible packing quickly, and its number of containers is an upper bound; when the two bounds are equal, the packing is optimal.
A common slip is to treat the total-weight bound as the answer. Three items of weight with have total weight , so the bound is , but no two of them fit together because ; three containers are needed.
Key Results¶
- Each item must be packed exactly once without splitting it.
- Any feasible packing provides an upper bound on the minimum number of containers.
- The total-weight bound is ; it need not be attainable. This follows by aggregating the capacity requirements.
Examples¶
The figure is a separate four-item illustration with weights and capacity . Its lower bound is , attained by the displayed packing and . This proves optimality for the illustrated instance, rather than for the 15-item course exercise.
- The exercise has 15 items and container capacity 50.
- First-fit uses five containers, while the solution sheet states that four suffice.
Prerequisites¶
Related Concepts¶
Sources¶
- OR Modelling · Week 1
Aliases: bin packing Keywords: Container packing Symbols: sum
Last updated: 20 October 2026 03:02
Bin Packing ProblemFirst-Fit HeuristicFeasible SolutionHeuristicOptimization Bounds