Fully Dynamic Algorithms for Bin Packing: Being (mostly) Myopic Helps

The problem of maintaining an approximate solution for one-dimensional bin packing when items may arrive and depart dynamically is studied. In accordance with various work on fully dynamic algorithms, and in contrast to prior work on bin packing, it is assumed that the packing may be arbitrarily rearranged to accommodate arriving and departing items. In this context our main result is a fully dynamic approximation algorithm for bin packing that is 5/4-competitive and requires Θ (log n) time per operation (i.e. for an Insert or a Delete of an item). This competitive ratio of 5/4 is nearly as good as that of the best practical off-line algorithms. Our algorithm utilizes the technique (introduced here) whereby the packing of an item is done with a total disregard for already packed items of a smaller size. This myopic packing of an item may then cause several smaller items to be repacked (in a similar fashion). With a bit of additional sophistication to avoid certain “bad” cases, the number of items (either individual items or “bundles” of very small items treated as a whole) that needs to be repacked is bounded by a constant. Further, in the case where there are no departures of items (only dynamic arrivals), we provide a polynomial time approximation scheme such that for any competitive ratio exceeding 1, there is an algorithm having that competitive ratio, and a amortized running time of Θ (log2n) per Insert operation.