Best Fit Bin Packing with Random Order Revisited

Authors Susanne Albers, Arindam Khan, Leon Ladewig

Thumbnail PDF


  • Filesize: 0.61 MB
  • 15 pages

Document Identifiers

Author Details

Susanne Albers
  • Technische Universität München, Germany
Arindam Khan
  • Indian Institute of Science, Bangalore, India
Leon Ladewig
  • Technische Universität München, Germany

Cite AsGet BibTex

Susanne Albers, Arindam Khan, and Leon Ladewig. Best Fit Bin Packing with Random Order Revisited. In 45th International Symposium on Mathematical Foundations of Computer Science (MFCS 2020). Leibniz International Proceedings in Informatics (LIPIcs), Volume 170, pp. 7:1-7:15, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2020)


Best Fit is a well known online algorithm for the bin packing problem, where a collection of one-dimensional items has to be packed into a minimum number of unit-sized bins. In a seminal work, Kenyon [SODA 1996] introduced the (asymptotic) random order ratio as an alternative performance measure for online algorithms. Here, an adversary specifies the items, but the order of arrival is drawn uniformly at random. Kenyon’s result establishes lower and upper bounds of 1.08 and 1.5, respectively, for the random order ratio of Best Fit. Although this type of analysis model became increasingly popular in the field of online algorithms, no progress has been made for the Best Fit algorithm after the result of Kenyon. We study the random order ratio of Best Fit and tighten the long-standing gap by establishing an improved lower bound of 1.10. For the case where all items are larger than 1/3, we show that the random order ratio converges quickly to 1.25. It is the existence of such large items that crucially determines the performance of Best Fit in the general case. Moreover, this case is closely related to the classical maximum-cardinality matching problem in the fully online model. As a side product, we show that Best Fit satisfies a monotonicity property on such instances, unlike in the general case. In addition, we initiate the study of the absolute random order ratio for this problem. In contrast to asymptotic ratios, absolute ratios must hold even for instances that can be packed into a small number of bins. We show that the absolute random order ratio of Best Fit is at least 1.3. For the case where all items are larger than 1/3, we derive upper and lower bounds of 21/16 and 1.2, respectively.

Subject Classification

ACM Subject Classification
  • Theory of computation → Online algorithms
  • Online bin packing
  • random arrival order
  • probabilistic analysis


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. A. Al-Herz and A. Pothen. A 2/3-approximation algorithm for vertex-weighted matching. Discrete Applied Mathematics, 2019. (in press). Google Scholar
  2. J. Balogh, J. Békési, G. Dósa, L. Epstein, and A. Levin. A new and improved algorithm for online bin packing. In Proceedings of the 26th Annual European Symposium on Algorithms (ESA), volume 112 of LIPIcs, pages 5:1-5:14, 2018. Google Scholar
  3. J. Balogh, J. Békési, G. Dósa, L. Epstein, and A. Levin. A new lower bound for classic online bin packing. In Approximation and Online Algorithms - 17th International Workshop, (WAOA), volume 11926 of Lecture Notes in Computer Science, pages 18-28. Springer, 2019. Google Scholar
  4. J. Boyar, G. Dósa, and L. Epstein. On the absolute approximation ratio for first fit and related results. Discret. Appl. Math., 160(13-14):1914-1923, 2012. Google Scholar
  5. M. G. Christ, L. M. Favrholdt, and K. S. Larsen. Online bin covering: Expectations vs. guarantees. Theor. Comput. Sci., 556:71-84, 2014. Google Scholar
  6. H. I. Christensen, A. Khan, S. Pokutta, and P. Tetali. Approximation and online algorithms for multidimensional bin packing: A survey. Comput. Sci. Rev., 24:63-79, 2017. Google Scholar
  7. E. G. Coffman, J. Csirik, G. Galambos, S. Martello, and D. Vigo. Bin packing approximation algorithms: survey and classification. In Handbook of combinatorial optimization, pages 455-531. Springer New York, 2013. Google Scholar
  8. W. F. de la Vega and G. S. Lueker. Bin packing can be solved within 1+epsilon in linear time. Combinatorica, 1(4):349-355, 1981. Google Scholar
  9. G. Dósa and J. Sgall. First fit bin packing: A tight analysis. In 30th International Symposium on Theoretical Aspects of Computer Science (STACS), volume 20 of LIPIcs, pages 538-549, 2013. Google Scholar
  10. G. Dósa and J. Sgall. Optimal analysis of best fit bin packing. In Proceedings of the 41st International Colloquium on Automata, Languages, and Programming (ICALP), pages 429-441, 2014. Google Scholar
  11. C. Fischer and H. Röglin. Probabilistic analysis of the dual next-fit algorithm for bin covering. In LATIN 2016: Theoretical Informatics - 12th Latin American Symposium, pages 469-482, 2016. Google Scholar
  12. C. Fischer and H. Röglin. Probabilistic analysis of online (class-constrained) bin packing and bin covering. In LATIN 2018: Theoretical Informatics - 13th Latin American Symposium, volume 10807 of Lecture Notes in Computer Science, pages 461-474. Springer, 2018. Google Scholar
  13. B. Gamlath, M. Kapralov, A. Maggiori, O. Svensson, and D. Wajc. Online matching with general arrivals. In 60th IEEE Annual Symposium on Foundations of Computer Science (FOCS), pages 26-37, 2019. Google Scholar
  14. M. R. Garey, R. L. Graham, and J. D. Ullman. Worst-case analysis of memory allocation algorithms. In Proceedings of the 4th Annual ACM Symposium on Theory of Computing (STOC), pages 143-150, 1972. Google Scholar
  15. M. R. Garey and D. S. Johnson. "Strong" NP-completeness results: Motivation, examples, and implications. J. ACM, 25(3):499-508, 1978. Google Scholar
  16. R. L. Graham. Bounds on multiprocessing timing anomalies. SIAM Journal of Applied Mathematics, 17(2):416-429, 1969. Google Scholar
  17. A. Gupta and S. Singla. Random-order models. CoRR, abs/2002.12159, 2020. URL:
  18. R. Hoberg and T. Rothvoss. A logarithmic additive integrality gap for bin packing. In Proceedings of the 28th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 2616-2625, 2017. Google Scholar
  19. Z. Huang, N. Kang, Z. G. Tang, X. Wu, Y. Zhang, and X. Zhu. How to match when all vertices arrive online. In Proceedings of the 50th Annual ACM SIGACT Symposium on Theory of Computing (STOC), pages 17-29, 2018. Google Scholar
  20. Z. Huang, B. Peng, Z. Gavin Tang, R. Tao, X. Wu, and Y. Zhang. Tight competitive ratios of classic matching algorithms in the fully online model. In Proceedings of the 30th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 2875-2886, 2019. Google Scholar
  21. Z. Huang, Z. G. Tang, X. Wu, and Y. Zhang. Online vertex-weighted bipartite matching: Beating 1-1/e with random arrivals. ACM Trans. Algorithms, 15(3):38:1-38:15, 2019. Google Scholar
  22. D. S. Johnson. Fast algorithms for bin packing. J. Comput. Syst. Sci., 8(3):272-314, 1974. Google Scholar
  23. D. S. Johnson, A. J. Demers, J. D. Ullman, M. R. Garey, and R. L. Graham. Worst-case performance bounds for simple one-dimensional packing algorithms. SIAM J. Comput., 3(4):299-325, 1974. Google Scholar
  24. E. G. Coffman Jr., J. Csirik, L. Rónyai, and A. Zsbán. Random-order bin packing. Discret. Appl. Math., 156(14):2810-2816, 2008. Google Scholar
  25. E. G. Coffman Jr. and G. S. Lueker. Probabilistic analysis of packing and partitioning algorithms. Wiley-Interscience series in discrete mathematics and optimization. Wiley, 1991. Google Scholar
  26. N. Karmarkar and R. M. Karp. An efficient approximation scheme for the one-dimensional bin-packing problem. In Proceedings of the 23rd Annual Symposium on Foundations of Computer Science (FOCS), pages 312-320, 1982. Google Scholar
  27. R. M. Karp, U. V. Vazirani, and V. V. Vazirani. An optimal algorithm for on-line bipartite matching. In Harriet Ortiz, editor, Proceedings of the 22nd Annual ACM Symposium on Theory of Computing (STOC), pages 352-358, 1990. Google Scholar
  28. C. Kenyon. Best-fit bin-packing with random order. In Proceedings of the 7th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 359-364, 1996. Google Scholar
  29. C. C. Lee and D. T. Lee. A simple on-line bin-packing algorithm. J. ACM, 32(3):562-572, 1985. Google Scholar
  30. D. A. Levin and Y. Peres. Markov chains and mixing times, volume 107. American Mathematical Soc., 2017. Google Scholar
  31. M. Mahdian and Q. Yan. Online bipartite matching with random arrivals: an approach based on strongly factor-revealing LPs. In Proceedings of the 43rd ACM Symposium on Theory of Computing (STOC), pages 597-606, 2011. Google Scholar
  32. A. Mehta. Online matching and ad allocation. Foundations and Trends in Theoretical Computer Science, 8(4):265-368, 2013. Google Scholar
  33. F. D. Murgolo. Anomalous behavior in bin packing algorithms. Discret. Appl. Math., 21(3):229-243, 1988. Google Scholar
  34. P. V. Ramanan. Average-case analysis of the smart next fit algorithm. Inf. Process. Lett., 31(5):221-225, 1989. Google Scholar
  35. P. V. Ramanan, D. J. Brown, C. C. Lee, and D. T. Lee. On-line bin packing in linear time. J. Algorithms, 10(3):305-326, 1989. Google Scholar
  36. S. S. Seiden. On the online bin packing problem. J. ACM, 49(5):640-671, 2002. Google Scholar
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail