SIAM REVIEW c 2002 Society for Industrial and Applied Mathematics Vol. 44, No. 1, pp. 95–108 Perfect Packing Theorems and the Average-Case Behavior of Optimal and Online Bin Packing * E. G. Coffman, Jr. † C. Courcoubetis ‡ M. R. Garey § D. S. Johnson ¶ P. W. Shor ¶ R. R. Weber ‖ M. Yannakakis ∗∗ Abstract. We consider the one-dimensional bin packing problem under the discrete uniform distri- butions U {j, k},1 ≤ j ≤ k - 1, in which the bin capacity is k and item sizes are chosen uniformly from the set {1, 2,...,j }. Note that for 0 <u = j/k ≤ 1 this is a discrete version of the previously studied continuous uniform distribution U (0,u], where the bin capacity is 1 and item sizes are chosen uniformly from the interval (0,u]. We show that the average-case performance of heuristics can differ substantially between the two types of distributions. In particular, there is an online algorithm that has constant expected wasted space under U {j, k} for any j, k with 1 ≤ j<k - 1, whereas no online algorithm can have o(n 1/2 ) expected waste under U (0,u] for any 0 <u ≤ 1. Our U {j, k} result is an application of a general theorem of Courcoubetis and Weber that covers all discrete distributions. Under each such distribution, the optimal expected waste for a random list of n items must be either Θ(n), Θ(n 1/2 ), or O(1), depending on whether certain “perfect” packings exist. The perfect packing theorem needed for the U {j, k} distributions is an intriguing result of independent combinatorial interest, and its proof is a cornerstone of the paper. We also survey other recent results comparing the behavior of heuristics under discrete and continuous uniform distributions. Key words. bin packing, online, average-case analysis, approximation algorithms AMS subject classifications. 68W25, 68W40 PII. S0036144501395423 1. Introduction. Suppose one is given items of sizes 1, 2, 3,...,j , one of each size, and is asked to pack them into bins of capacity k with as little wasted space as possible, i.e., one is asked to find a least cardinality partition (packing) of the set of items such that the sizes of the items in each block (bin) sum to at most k. For what ∗ Published electronically February 1, 2002. This paper originally appeared in SIAM Journal on Discrete Mathematics, Volume 13, Number 3, 2000, pages 384–402. http://www.siam.org/journals/sirev/44-1/39542.html † Columbia University, New York, NY 10027 (egc@ee.columbia.edu). ‡ Department of Computer Science, Athens University of Economics and Business, Athens, Greece (courcou@csi.forth.gr). § Bell Labs, Murray Hill, NJ 07974. ¶ AT&T Labs–Research, Florham Park, NJ 07932 (dsj@research.att.com, shor@research.att.com). ‖ Statistical Laboratory, University of Cambridge, Cambridge CB3 0WB, UK (R.R.Weber@ statslab.cam.ac.uk). ∗∗ Avaya Labs Research, Basking Ridge, NJ 07920 (mihalis@research.avayalabs.com). 95