An All-Around Near-Optimal Solution for the Classic Bin Packing Problem
Abstract
In this paper we present the first algorithm with optimal average-case and close-to-best known worst-case performance for the classic on-line problem of bin packing. It has long been observed that known bin packing algorithms with optimal average-case performance were not optimal in the worst-case sense. In particular First Fit and Best Fit had optimal average-case ratio of 1 but a worst-case competitive ratio of 1.7. The wasted space of First Fit and Best Fit for a uniform random sequence of length is expected to be and , respectively. The competitive ratio can be improved to 1.691 using the Harmonic algorithm; further variations of this algorithm can push down the competitive ratio to 1.588. However, Harmonic and its variations have poor performance on average; in particular, Harmonic has average-case ratio of around 1.27. In this paper, first we introduce a simple algorithm which we term Harmonic Match. This algorithm performs as well as Best Fit on average, i.e., it has an average-case ratio of 1 and expected wasted space of . Moreover, the competitive ratio of the algorithm is as good as Harmonic, i.e., it converges to which is an improvement over 1.7 of Best Fit and First Fit. We also introduce a different algorithm, termed as Refined Harmonic Match, which achieves an improved competitive ratio of while maintaining the good average-case performance of Harmonic Match and Best Fit. Finally, our extensive experimental evaluation of the studied bin packing algorithms shows that our proposed algorithms have comparable average-case performance with Best Fit and First Fit, and this holds also for sequences that follow distributions other than the uniform distribution.
Keywords
Cite
@article{arxiv.1404.4526,
title = {An All-Around Near-Optimal Solution for the Classic Bin Packing Problem},
author = {Shahin Kamali and Alejandro López-Ortiz},
journal= {arXiv preprint arXiv:1404.4526},
year = {2014}
}
Comments
20 pages (including the abstract and references), 3 Figures, 2 tables