A 2.37332-Competitive Algorithm for Online Square Packing with Gravity
This paper introduces the algorithm, which achieves a 2.37332-competitive ratio for online square packing in a unit-width strip under Tetris and gravity constraints, improving upon the previous best bound of approximately 2.6154 while also establishing optimal dependence on aspect ratio for general rectangles.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine a world where you must build a tower, one block at a time, without ever seeing what comes next. You cannot rearrange the blocks you have already placed, and you cannot reach into the structure to move them aside. Every new block must drop from above, falling straight down until it hits the top of the existing pile or the floor. If a gap exists in the tower, but it is blocked from above by a wider block, that gap is useless; nothing can ever reach it. This is the challenge of online packing under gravity, a problem that sits at the intersection of geometry and logistics. It asks a simple but stubborn question: how can a system make the best possible decisions when it is blind to the future and bound by the laws of physics?
For years, the best known method for stacking square blocks in this manner could guarantee a tower no more than about 2.62 times taller than the absolute shortest tower possible if one had seen all the blocks in advance. This gap between the online reality and the offline ideal represented a significant inefficiency. Researchers had long suspected that a smarter way to organize the space might close this gap, but the constraints of gravity and the lack of foresight made finding such a method exceptionally difficult. The problem is not just about fitting shapes together; it is about managing the flow of space as it is consumed, ensuring that the path for future blocks remains open even as the current structure grows.
A recent study introduces a new strategy called AsymmetricSlots, which successfully tightens this efficiency gap. The researchers developed a method that improves the worst-case performance of the packing algorithm, proving that the resulting tower will never be more than approximately 2.37 times the height of the perfect, pre-planned tower. This is a measurable improvement over the previous best result, bringing the theoretical limit of online square packing significantly closer to the ideal. The work does not claim to have solved the problem entirely, as a gap remains between this new upper limit and the known lower limit of 2, but it establishes a new, higher standard for what is achievable.
The core of this new approach lies in how the available space is divided. Previous methods treated the vertical strip of space as a series of equal-sized, nested compartments, splitting the width in half at every level. The new algorithm breaks this symmetry. Instead of splitting the space evenly, it divides every available slot into two unequal children: one wide and one narrow. When a new square arrives, the algorithm decides where to send it based on its size relative to these unequal divisions. If a square is too large for the narrow child, it is forced into the wide child. If it is small enough to fit in both, the algorithm sends it to whichever child currently has the lower stack of blocks. This local decision-making process, repeated as the square descends through the hierarchy of slots, allows the system to balance the load more effectively than the old symmetric methods.
To prove that this strategy works, the researchers used a method of accounting that tracks the "cost" of every square placed. They imagined that each square pays for the height it adds to the tower using its own area as currency. Large squares, which are forced into specific slots, pay for their own height directly. Smaller squares, which have the flexibility to choose between slots, are handled through a system of temporary credits that balance out over time. The analysis shows that the loss of efficiency caused by these flexible choices does not accumulate as the tower grows taller; instead, it remains bounded. This mathematical proof confirms that the algorithm's performance is stable and predictable, regardless of the sequence of blocks it receives.
The study also extends this logic to rectangles that are not perfect squares, but are limited in how long and thin they can be. For these shapes, the researchers found that the efficiency of the packing depends directly on the maximum ratio of a rectangle's length to its width. They proved that as this ratio increases, the difficulty of packing increases in a predictable, linear fashion. This result suggests that the method is robust and can be adapted to a wider variety of shapes, provided the shapes do not become infinitely thin. Conversely, they also demonstrated that no online algorithm can do significantly better than this linear relationship, meaning the dependence on the shape's proportions is fundamental to the problem itself.
While the new algorithm represents a significant step forward, the researchers are careful to note that the problem is not yet fully solved. They constructed specific scenarios where their new algorithm produces a tower twice as tall as the optimal offline solution, showing that the gap between the best possible online performance and the theoretical ideal is still substantial. The difference between the new upper limit of roughly 2.37 and the lower limit of 2 remains a wide chasm for mathematicians to bridge. However, by establishing a new, tighter bound and providing a framework that handles both squares and bounded rectangles, this work clarifies the landscape of the problem. It shows that with the right kind of asymmetric organization, the constraints of gravity and ignorance of the future can be managed with greater precision than previously thought possible.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.