Online Bin Packing of Squares and Cubes

Leah Epstein, Loay Mualem

Abstract

In the d-dimensional online bin packing problem, d-dimensional cubes of positive sizes no larger than 1 are presented one by one to be assigned to positions in d-dimensional unit cube bins. In this work, we provide improved upper bounds on the asymptotic competitive ratio for square and cube bin packing problems, where our bounds do not exceed 2.0885 and 2.5735 for square and cube packing, respectively. To achieve these results, we adapt and improve a previously designed harmonic-type algorithm, and apply a different method for defining weight functions. We detect deficiencies in the state-of-the-art results by providing counter-examples to the current best algorithms and the analysis, where the claimed bounds were 2.1187 for square packing and 2.6161 for cube packing.

Introduction

Bin packing is a fundamental optimization problem with broad applications in logistics, manufacturing, and resource allocation. In the online version of the problem, items arrive sequentially, and each must be placed in a unit bin immediately without knowledge of future arrivals. While the one-dimensional case is well-studied, packing $d$-dimensional objects like squares ($d=2$) or cubes ($d=3$) presents significant geometric challenges.

The performance of an online algorithm is typically evaluated by its asymptotic competitive ratio (ACR), which compares the number of bins used by the algorithm to that of an optimal offline algorithm as the number of items grows. Prior to this work, the state-of-the-art ACRs were believed to be 2.1187 for squares and 2.6161 for cubes. However, this research identifies flaws in those previous analyses and proposes a refined approach to achieve tighter, provable bounds.

Methodology

The core of the proposed approach is the Extended Harmonic (EH) algorithm. This algorithm categorizes items into two main groups:

  1. Small Items: Managed by a sub-algorithm, AssignSmall, which ensures high density by packing tiny items into remaining spaces.
  2. Large Items: Classified into numerous specific types based on their side lengths.

The EH algorithm employs a "red/blue" coloring scheme. "Blue" items are primary items that typically open new bins, while "red" items are secondary items packed into the "L-shaped" or leftover spaces created by blue items. This geometric interaction is visualized in Figure 1.

Geometric partitioning of a unit bin into sub-regions for different item types.

To analyze the algorithm's performance, the authors define four distinct bin types based on the combination of item types they contain, as detailed in Figure 2.

Classification of bin types based on the presence of blue and red items.

A key innovation in this work is a new weighting technique. Unlike traditional binary weighting (0 or 1), the authors introduce a rational parameter $w \in [0, 1]$. This allows the "cost" of a bin to be distributed more fluidly between red and blue items. The optimal weights are determined using computer-assisted proofs involving complex integer programming to identify worst-case scenarios.

Results and Analysis

The research provides new, improved upper bounds for the ACR:

  • Square Packing ($d=2$): 2.0885
  • Cube Packing ($d=3$): 2.5735

Beyond establishing new bounds, the authors provide counter-examples ($P_1$ and $P_2$) to demonstrate that previous claims in the literature were incorrect. Specifically, they show that the previously accepted bound of 2.1187 for squares is unattainable by the algorithm for which it was claimed, proving it can be forced to a ratio as high as 2.122.

Discussion and Conclusion

The improvement in ACR stems from the flexibility of the new weighting "knob" and a more rigorous treatment of geometric constraints. By identifying that previous researchers used inconsistent weight functions across different scenarios, this work resets the baseline for the field.

Despite these improvements, a gap remains between the new upper bounds and the known lower bounds (e.g., ~1.75154 for squares). Future work may require moving beyond the Extended Harmonic framework, as the current model already utilizes over 150 item types. Further granularity in interval partitioning may yield diminishing returns, suggesting the need for entirely new algorithmic structures or extensions to non-cube "box" packing.

Summary updated

Abstract

In the d-dimensional online bin packing problem, d-dimensional cubes of positive sizes no larger than 1 are presented one by one to be assigned to positions in d-dimensional unit cube bins. In this work, we provide improved upper bounds on the asymptotic competitive ratio for square and cube bin packing problems, where our bounds do not exceed 2.0885 and 2.5735 for square and cube packing, respectively. To achieve these results, we adapt and improve a previously designed harmonic-type algorithm, and apply a different method for defining weight functions. We detect deficiencies in the state-of-the-art results by providing counter-examples to the current best algorithms and their analysis, where the claimed bounds were 2.1187 for square packing and 2.6161 for cube packing.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Online square packingExtended Harmonic (EH)Asymptotic competitive ratio upper bound2.0885Online Bin Packing · dimension=2
Source quote
L90: \item To emphasize the effectiveness of our new suggested algorithm, we established an improved asymptotic competitive ratio for the cases d=2,3. We obtain tighter upper bounds for the asymptotic competitive ratio for the online square and cube packing. Specifically, the algorithms have asymptotic competitive ratios of at most 2.0885 and 2.5735, respectively. This is to be compared to the currently known bounds of 2.1187 for square packing and 2.6161 for cube packing by~\cite{HanYZ10} (which are unfortunately incorrect, but it might be possible to prove slightly inferior bounds for these algorithms using our method of analysis).
Online cube packingExtended Harmonic (EH)Asymptotic competitive ratio upper bound2.5735Online Bin Packing · dimension=3
Source quote
L90: \item To emphasize the effectiveness of our new suggested algorithm, we established an improved asymptotic competitive ratio for the cases d=2,3. We obtain tighter upper bounds for the asymptotic competitive ratio for the online square and cube packing. Specifically, the algorithms have asymptotic competitive ratios of at most 2.0885 and 2.5735, respectively. This is to be compared to the currently known bounds of 2.1187 for square packing and 2.6161 for cube packing by~\cite{HanYZ10} (which are unfortunately incorrect, but it might be possible to prove slightly inferior bounds for these algorithms using our method of analysis).
BibTeX
@inproceedings{epstein2021online,
  author = {Leah Epstein and Loay Mualem},
  title = {{Online Bin Packing of Squares and Cubes}},
  booktitle = {Algorithmica},
  year = {2021},
  url = {https://openreview.net/forum?id=QEAv4WB1Ll},
}
Figure