An Efficient Approximation Scheme for the One-Dimensional Bin-Packing Problem I: ALGORITHM 1, Linear Grouping with LP Rounding, Is an Asymptotic Approximation SchemeResearch Paper
Motivation
One-dimensional bin packing asks for the fewest unit-capacity bins that hold a given list of items with sizes in . It is the model behind cutting stock (cutting rolls of paper or steel to ordered widths), memory and file allocation, and batch scheduling on identical machines, and it is NP-hard. Its algorithmic study is therefore about approximation: how close to the optimum a polynomial-time algorithm can guarantee to come.
- 1961–1963: Gilmore and Gomory introduce the configuration linear program for cutting stock and solve it by column generation (Gilmore–Gomory 1961).
- 1974: Johnson, Demers, Ullman, Garey and Graham analyse First Fit and related heuristics, with asymptotic ratio and (Johnson et al. 1974).
- 1981: Fernandez de la Vega and Lueker give the first asymptotic approximation scheme, packing within bins in time linear in for fixed , using elimination of small pieces and linear grouping (Fernandez de la Vega–Lueker 1981).
- 1982: Karmarkar and Karp replace the enumeration of configurations by an approximate solution of the configuration LP and a rounding step, obtaining an additive term polynomial in (this mission), and, with geometric grouping, (Karmarkar–Karp 1982).
- 2013–2017: Rothvoß and then Hoberg–Rothvoß improve the additive term to and (Hoberg–Rothvoß 2017).
Setting
An instance is a finite multiset of piece sizes, each in the open interval . Write for the number of pieces, for the number of distinct sizes, and for the sum of all sizes. A packing of is a finite multiset of bins, each a multiset of sizes, whose union is exactly and in which every bin has total size at most . Its cost is the number of bins, and is the minimum cost.
A configuration of is a nonempty multiset of sizes occurring in with total at most . With the number of pieces of size and the number of occurrences of in configuration , the fractional bin-packing problem is the linear program
whose optimal value is . A basic feasible solution is an extreme point of its feasible region.
For instances , write if there is a one-to-one map from the pieces of into the pieces of with . Linear grouping with parameter sorts non-increasingly, cuts it into groups of consecutive pieces (the last possibly shorter), rounds every piece of up to the largest size of to get , and outputs and .
ALGORITHM 1 takes and : (1) discard the pieces of size , leaving ; (2) apply linear grouping to with , giving and ; (3) put each piece of in its own bin; (4) obtain from a Fractional Bin-Packing subroutine a basic feasible solution of the LP of with ; (5) round to a packing of with at most bins; (6) shrink the pieces back to obtain a packing of ; (7) insert the discarded pieces, opening a new bin only when a piece fits nowhere. is the cost of the resulting packing.
Formalization targets
Goal: Theorem 3, as its proof establishes it
The additive term depends on only, so ALGORITHM 1 is an asymptotic approximation scheme. The paper prints the factor , which fails for ALGORITHM 1 as printed (see Formalization scope); running the algorithm with gives the paper's main result (4), , stated as a separate corollary with the explicit term .
Milestones
- Lemma 1: .
- Lemma 2: .
- Corollary 1: every basic feasible solution can be rounded to a packing of cost .
- Lemma 3: inserting pieces of size last, with new bins only when necessary, costs at most .
- Monotonicity: implies , and do not decrease.
- Lemma 4: linear grouping loses at most in , and .
- Proof steps (ii)–(iii) (corrected): .
- Proof step (iv): .
- Proof step (vii): .
- Proof step (viii) (corrected): the packing of Step 6 has at most bins.
Significance
The result showed that the configuration LP, of exponential size in general, can be used for a guaranteed approximation: its value is within of the integer optimum, and grouping reduces at small cost. The same template (eliminate small items, group, solve the configuration LP, round a basic solution, reinsert) underlies later schemes for bin packing, cutting stock, bin packing with cardinality constraints and scheduling, and the LP-based analysis is the starting point of the Rothvoß and Hoberg–Rothvoß improvements.
The theorems are proved in the literature; none of them has a machine-checked proof on the platform or, to our knowledge, in Mathlib. This mission produces a checked analysis of the algorithm, including a correction: the printed approximation factor is not valid for the algorithm as printed, and the checked statement records the factor its proof yields. The definitions (instances, packings, the configuration LP, basic solutions, the order , any-fit insertion) are reusable for the second mission of the series and for other bin-packing results.
Difficulty
The Lean statements are short, but several proofs need linear-programming structure that is not in Mathlib in this form. Lemma 2 and Corollary 1 use that an extreme point of has at most as many nonzero coordinates as there are rows of ; the configuration LP is indexed by a finite but implicitly described set of multisets. Monotonicity of under ("clearly" in the paper) requires transporting a fractional solution across a piece-to-piece matching whose images are types, not pieces. The existence of a run requires an optimal basic feasible solution of the configuration LP. Lemma 3 concerns an insertion process with unrestricted order and bin choice, so its bound has to hold for every execution, not for one greedy rule.
Formalization scope
- Sizes are real numbers in the open interval ; the paper says "a rational number between 0 and 1". Real sizes generalize rational ones; the open interval is what the paper's arguments use.
- Instances are
Multiset ℝ; packings areMultiset (Multiset ℝ)withjoinequal to the instance, bin loads at most , empty bins allowed and counted. is a natural-number infimum over a set that is always nonempty. - LP solutions are
Multiset ℝ →₀ ℝsupported on configurations. is a real infimum over a set that is nonempty (singleton configurations) and bounded below by . "Basic" is the extreme-point property; the bound on the number of nonzero coordinates is a consequence, not the definition. - The Fractional Bin-Packing subroutine is modelled by its contract only (§5, p. 315): any basic feasible solution of cost at most . The ellipsoid method of §6 is not modelled.
- ALGORITHM 1 is a relation
Alg1Run ε I P: is a possible output. Every open choice is quantified: the subroutine's output, the packing of Step 5 (any packing within the stated bound), the size reduction of Step 6 (bin by bin), and the insertion of Step 7 (any order, any fitting bin). The goal holds for every run, and a separate item states that a run exists, so the goal is not vacuous. - The paper's in result (4) is replaced by the explicit .
- Corrected statements. The printed Theorem 3 bound fails: for and pieces of size , some run uses bins while the bound is . The failing step is (ii), , since Step 1 discards only pieces . Steps (ii)–(iii) and (viii) are stated with ; step (iv) is stated as because its first link fails when the last group is short.
- Running time (Theorem 3's first half, Corollary 1's time bound, the function ) is out of scope.
- Trivializations are ruled out: "some packing has at most the bound" is not the goal; the goal constrains every output of the algorithm, and the packing property of that output is part of its conclusion.
Proofs of any item are welcome; Lemma 2, Corollary 1 and the monotonicity display are the most reusable.
Selected references
- N. Karmarkar, R. M. Karp, An Efficient Approximation Scheme for the One-Dimensional Bin-Packing Problem, Proc. 23rd FOCS (SFCS 1982), IEEE, pp. 312–320. https://doi.org/10.1109/sfcs.1982.61
- W. Fernandez de la Vega, G. S. Lueker, Bin packing can be solved within 1+ε in linear time, Combinatorica 1 (1981) 349–355. https://doi.org/10.1007/BF02579456
- P. C. Gilmore, R. E. Gomory, A Linear Programming Approach to the Cutting-Stock Problem, Operations Research 9 (1961) 849–859. https://doi.org/10.1287/opre.9.6.849
- D. S. Johnson, A. Demers, J. D. Ullman, M. R. Garey, R. L. Graham, Worst-Case Performance Bounds for Simple One-Dimensional Packing Algorithms, SIAM J. Comput. 3 (1974) 299–325. https://doi.org/10.1137/0203025
- R. Hoberg, T. Rothvoß, A Logarithmic Additive Integrality Gap for Bin Packing, Proc. SODA 2017, 2616–2625. https://doi.org/10.1137/1.9781611974782.172