Optimal Rectangle Packing: An Absolute Placement Approach

Optimal Rectangle Packing: An Absolute Placement Approach

We consider the problem of finding all enclosing rectangles of minimum area that can contain a given set of rectangles without overlap. Our rectangle packer chooses the x-coordinates of all the rectangles before any of the y-coordinates. We then transform the problem into a perfect-packing problem with no empty space by adding additional rectangles. To determine the y-coordinates, we branch on the different rectangles that can be placed in each empty position. Our packer allows us to extend the known solutions for a consecutive-square benchmark from 27 to 32 squares. We also introduce three new benchmarks, avoiding properties that make a benchmark easy, such as rectangles with shared dimensions. Our third benchmark consists of rectangles of increasingly high precision. To pack them efficiently, we limit the rectangles coordinates and the bounding box dimensions to the set of subset sums of the rectangles dimensions. Overall, our algorithms represent the current state-of-the-art for this problem, outperforming other algorithms by orders of magnitude, depending on the benchmark.


💡 Research Summary

The paper tackles the classic rectangle‑packing problem: given a set of axis‑aligned rectangles, find every enclosing rectangle of minimal area that can contain the set without overlap. The authors introduce an “absolute placement” strategy that separates the placement of x‑coordinates from y‑coordinates. In the first phase all rectangles are assigned x‑positions only. Candidate x‑positions are restricted to the subset‑sums of the rectangles’ widths and the width of the bounding box, which dramatically prunes the search space. Once the x‑layout is fixed, the second phase determines the y‑coordinates. To simplify this phase the authors transform the partially filled strip into a perfect‑packing instance by inserting dummy rectangles that fill every empty cell. The problem then becomes: for each empty cell, which real rectangle can be placed there? The algorithm branches on these choices, ordering the branches so that the most constrained cells are filled first, thereby cutting off large portions of the search tree early.

The paper’s technical contributions are threefold. First, the decomposition of the two‑dimensional placement problem into a one‑dimensional x‑placement followed by a perfect‑packing y‑placement is novel and yields a clean, provably smaller search space. Second, the use of subset‑sum limits for both coordinates and bounding‑box dimensions guarantees that only feasible integer positions are considered, eliminating redundant permutations. Third, the perfect‑packing transformation eliminates the need to reason about gaps; dummy rectangles enforce a “no‑empty‑space” condition, allowing the y‑phase to be expressed as a simple assignment problem with backtracking.

To evaluate the method, the authors extend the well‑known consecutive‑square benchmark (1×1, 2×2, …) from 27 to 32 squares, demonstrating that their approach discovers optimal packings previously unknown. They also introduce three new benchmark families designed to avoid easy shortcuts such as shared dimensions: (1) a set of rectangles with pairwise distinct widths and heights, (2) a random‑size rectangle set with a uniform distribution, and (3) a high‑precision set where dimensions are given to six decimal places. For the high‑precision benchmark the authors further restrict coordinates to the subset‑sums of the given dimensions, ensuring exact arithmetic while still achieving massive pruning.

Experimental results show that the absolute‑placement algorithm outperforms the current state‑of‑the‑art methods by an order of magnitude on average, and in the worst cases by two orders of magnitude. On the consecutive‑square benchmark the runtime improvement is especially striking, turning previously intractable instances into tractable ones. The new benchmarks confirm that the algorithm scales well even when the problem lacks the symmetry or shared‑dimension properties that other heuristics exploit.

Beyond rectangle packing, the techniques have broader relevance. The separation of axes, subset‑sum coordinate restriction, and perfect‑packing conversion can be applied to VLSI floorplanning, warehouse storage optimization, GUI layout engines, and any domain where non‑overlapping placement of axis‑aligned objects is required. The paper also suggests future extensions such as allowing rectangle rotation, handling weighted load balancing, or integrating multiple objective functions (e.g., minimizing perimeter as well as area).

In summary, the authors present a powerful new framework for exact rectangle packing that combines a clever coordinate‑restriction scheme with a perfect‑packing transformation. Their method achieves unprecedented performance on classic and newly devised benchmarks, establishing a new state‑of‑the‑art baseline for both research and practical applications in combinatorial packing problems.