Best Fit Bin Packing with Random Order Revisited

Susanne Albers, Arindam Khan, Leon Ladewig

Abstract

Best Fit is a well-known online algorithm for the bin packing problem, where a collection of one-dimensional items must 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. Kenyon's result established lower and upper bounds of 1.08 and 1.5, respectively, for the random order ratio of Best Fit. 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. Moreover, we initiate the study of the absolute random order ratio for this problem, showing that for Best Fit it is at least 1.3.

Introduction

Bin packing is a fundamental optimization problem: a set of items with various sizes must be packed into the minimum number of unit-sized bins. In the online version, items arrive sequentially, and a decision must be made for each item without knowledge of future arrivals. Standard worst-case analysis for the popular Best Fit (BF) algorithm—which places an item into the fullest bin it can fit in—yields a performance ratio of 1.7, meaning it uses up to 70% more bins than optimal.

However, worst-case analysis is often overly pessimistic for real-world scenarios. In 1996, Claire Kenyon introduced the Random Order (RO) model, where items are fixed by an adversary but arrive in a random permutation. Kenyon showed the ratio for Best Fit drops to between 1.08 and 1.5. Despite the model's popularity, these bounds remained stagnant for over two decades. This paper provides the first major progress since 1996, narrowing the gap and introducing new analytical dimensions for both asymptotic and absolute performance ratios.

Methodology and Theoretical Approach

The authors utilize three primary mathematical strategies to refine the performance bounds of Best Fit:

  1. Markov Chain Analysis: To establish a new general lower bound, the authors employ an i.i.d. model where item sizes are drawn independently from a fixed distribution. By modeling the state of open bins as a Markov chain and calculating the stationary distribution, they determine the expected number of bins used.
  2. Monotonicity and Structured Instances: A significant challenge in bin packing is that Best Fit is generally non-monotone (increasing an item's size can sometimes decrease the total bins used). The authors prove that if all items are larger than 1/3, Best Fit becomes monotone. This allows for the simplification of complex instances into structured "LM-pair" (one Large, one Medium item) formats, facilitating more rigorous analysis of adversarial constructions.
Optimal packing configurations for various item instances used in the random order analysis.
  1. Bipartite Graph Matching: For instances where items exceed 1/3, the packing process is modeled as a matching problem in a bipartite graph. By identifying "good order pairs"—where a large item arrives before its paired medium item—the authors can bound the algorithm's performance using combinatorial matching techniques.
Bipartite graph representation of item pairings for instances where all items exceed 1/3 bin capacity.

Key Insights and Results

The research yields several critical insights into the behavior of the Best Fit algorithm:

  • The 1/3 Threshold: Items larger than 1/3 of a bin capacity are identified as the primary drivers of inefficiency. When all items are $\le 1/3$, the algorithm's efficiency improves significantly. This threshold is crucial for determining the performance of Best Fit in the general case.
  • Asymptotic vs. Absolute Ratios: While previous work focused on the asymptotic ratio (performance as the number of items $n \to \infty$), this paper initiates the study of the absolute ratio (performance on any instance, including small ones). The discovery that the absolute random order ratio ($\ge 1.30$) is significantly higher than the asymptotic one ($\approx 1.10$) suggests that Best Fit struggles more with small, "noisy" instances than with massive ones when the order is random.
  • Improved Bounds: The asymptotic random order ratio for Best Fit is now proven to be $> 1.10$ (up from 1.08). For instances where all items are $> 1/3$, the ratio converges to 1.25. In this specific large-item case, the authors derive an upper bound of 21/16 (1.3125) and a lower bound of 1.2.

Conclusion and Future Directions

This work narrows a long-standing gap in the analysis of the Best Fit algorithm under random order. By proving monotonicity for items larger than 1/3, the authors transformed an unpredictable algorithm into one amenable to combinatorial matching techniques. The primary remaining challenge is the general upper bound, which remains at 1.5. Future research may focus on developing techniques to handle "small" items ($\le 1/3$) that do not follow the same monotonicity rules, as well as exploring the random order performance of other classic heuristics like First Fit.

Summary updated

Abstract

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.
BibTeX
@inproceedings{albers2021best,
  author = {Susanne Albers and Arindam Khan and Leon Ladewig},
  title = {{Best Fit Bin Packing with Random Order Revisited}},
  booktitle = {Algorithmica},
  year = {2021},
  url = {https://openreview.net/forum?id=G3rGH82VmL},
}
Figure