Online Sorting and Translational Packing of Convex Polygons
Anders Aamand, Mikkel Abrahamsen, Lorenzo Beretta, Linda Kleist
TL;DR
This work shows that online translational packing of convex polygons into strips or bins cannot in general achieve constant-factor competitiveness, in stark contrast to the rectangle case. The authors establish a fundamental link between online sorting and online packing, deriving lower bounds via an Online-Sorting problem that imply no online algorithm can be competitive for several packing variants. They complement these negative results with nontrivial online algorithms, notably OnlinePacker, which achieves a $O(n^{\log 3-1}\log n)$-competitive strip-packing algorithm by recursively subdividing the strip into a hierarchy of parallelogram boxes. Additionally, the paper analyzes Online-Sorting in depth, proving tight bounds for the $\gamma=1$ case and subpolynomial bounds for small overflow like $1+\varepsilon$, illustrating a rich interplay between online sorting, TSP-like on the line, and packing. Offline versions, by contrast, admit constant-factor approximations for convex polygon packing, underscoring a substantial qualitative gap between online and offline settings. These results sharpen our understanding of geometric packing in online contexts and highlight the central role of spine-slope sorting in achieving efficient layouts under translation-only constraints.
Abstract
We investigate several online packing problems in which convex polygons arrive one by one and have to be placed irrevocably into a container, while the aim is to minimize the used space. Among other variants, we consider strip packing and bin packing, where the container is the infinite horizontal strip $[0,\infty)\times [0,1]$ or a collection of $1 \times 1$ bins, respectively. We draw interesting connections to the following online sorting problem OnlineSorting$[γ,n]$: We receive a stream of real numbers $s_1,\ldots,s_n$, $s_i\in[0,1]$, one by one. Each real must be placed in an array $A$ with $γn$ initially empty cells without knowing the subsequent reals. The goal is to minimize the sum of differences of consecutive reals in $A$. The offline optimum is to place the reals in sorted order so the cost is at most $1$. We show that for any $Δ$-competitive online algorithm of OnlineSorting$[γ,n]$, it holds that $γΔ\inΩ(\log n/\log \log n)$. We use this lower bound to prove the non-existence of competitive algorithms for various online translational packing problems of convex polygons, among them strip packing, bin packing and perimeter packing. This also implies that there exists no online algorithm that can pack all streams of pieces of diameter and total area at most $δ$ into the unit square. These results are in contrast to the case when the pieces are restricted to rectangles, for which competitive algorithms are known. Likewise, the offline versions of packing convex polygons have constant factor approximation algorithms. As a complement, we also include algorithms for both online sorting and translation-only online strip packing with non-trivial competitive ratios. Our algorithm for strip packing relies on a new technique for recursively subdividing the strip into parallelograms of varying height, thickness and slope.
