AlgLab: An Open Laboratory for Experiments On Algorithms

AlgLab Home About Labs Related Contribute

BinPackLab: Approximation algorithms for one-dimensional bin packing

About the Lab

The One-Dimensional Bin Packing Problem is: Given a list L containing n weights in the range lo, hi, to pack the weights into unit-capacity bins so as to minimize the total number of bins used. Bin Packing is NP-Hard. Under the standard average-case model, each instance is a list of n weights drawn uniformly at random from the range lo, hi. This lab contains generators and code for several approximation algorithms:

Resources and Links

Code contributed by C. McGeoch and J. L. Bentley

Projects

  1. What is the asymptotic cost of First Fit?
  2. Characterize the cost of FF, measuring both Bin Counts and Empty Space, as a function of l, u, and n.
  3. Revise the code to apply trial overloading by reporting incremental results after every k items are packed. Does this give better views of packing performance?