Rectangle Packing
   HOME

TheInfoList



OR:

Rectangle packing is a
packing problem Packing problems are a class of optimization problems in mathematics that involve attempting to pack objects together into containers. The goal is to either pack a single container as densely as possible or pack all objects using as few conta ...
where the objective is to determine whether a given set of small rectangles can be placed inside a given large polygon, such that no two small rectangles overlap. Several variants of this problem have been studied.


Packing identical rectangles in a rectangle

In this variant, there are multiple instances of a single rectangle of size (''l'',''w''), and a bigger rectangle of size (''L'',''W''). The goal is to pack as many small rectangles as possible into the big rectangle without overlap between any rectangles (small or large). Common constraints of the problem include limiting small rectangle rotation to 90° multiples and requiring that each small rectangle is orthogonal to the large rectangle. This problem has some applications such as loading of boxes on pallets and, specifically,
woodpulp Pulp is a lignocellulosic fibrous material prepared by chemically or mechanically separating cellulose fibers from wood, fiber crops, waste paper, or rags. Mixed with water and other chemical or plant-based additives, pulp is the major raw mate ...
stowage. As an example result: it is possible to pack 147 small rectangles of size (137,95) in a big rectangle of size (1600,1230).


Packing identical squares in a rectilinear polygon

Given a
rectilinear polygon A rectilinear polygon is a polygon all of whose sides meet at right angles. Thus the interior angle at each vertex is either 90° or 270°. Rectilinear polygons are a special case of isothetic polygons. In many cases another definition is ...
(whose sides meet at right angles) ''R'' in the plane, a set ''S'' of points in ''R'', and a set of identical squares, the goal is to find the largest number of non-overlapping squares that can be packed in points of ''S''. Suppose that, for each point ''p'' in ''S'', we put a square centered at ''p''. Let ''G''S be the
intersection graph In graph theory, an intersection graph is a graph that represents the pattern of intersections of a family of sets. Any graph can be represented as an intersection graph, but some important special classes of graphs can be defined by the types o ...
of these squares. A square-packing is equivalent to an independent set in ''G''S. Finding a largest square-packing is NP-hard; one may prove this by reducing from
3SAT In logic and computer science, the Boolean satisfiability problem (sometimes called propositional satisfiability problem and abbreviated SATISFIABILITY, SAT or B-SAT) is the problem of determining if there exists an interpretation that satisfies ...
.


Packing different rectangles in a given rectangle

In this variant, the small rectangles can have varying lengths and widths, and they should be packed in a given large rectangle. The decision problem of whether such a packing exists is NP-hard. This can be proved by a reduction from 3-partition. Given an instance of 3-partition with 3''m'' positive integers: ''a''1, ..., ''a''3''m'', with a total sum of ''m T'', we construct 3''m'' small rectangles, all with a width of 1, such that the length of rectangle ''i'' is ''ai'' + ''m''. The big rectangle has width ''m'' and length ''T'' + 3''m''. Every solution to the 3-partition instance induces a packing of the rectangles into ''m'' subsets such that the total length in each subset is exactly ''T'', so they exactly fit into the big rectangle. Conversely, in any packing of the big rectangle, there must be no "holes", so the rectangles must not be rotated. Therefore, the packing must involve exactly ''m'' rows where each row contains rectangles with a total length of exactly ''T''. This corresponds to a solution of the 3-partition instance. When there is an additional restriction that the packing must be exact (with no wasted space), the small rectangles may be rotated only by multiples of 90°. In this case, the problem is in NP. Without this requirement, the small rectangles may be rotated in arbitrary angles. In this more general case, it is not clear if the problem is in NP, since it is much harder to verify a solution.


Packing different rectangles in a minimum-area rectangle

In this variant, the small rectangles can have varying lengths and widths, and their orientation is fixed (they cannot be rotated). The goal is to pack them in an enclosing rectangle of minimum area, with no boundaries on the enclosing rectangle's width or height. This problem has an important application in combining images into a single larger image. A web page that loads a single larger image often renders faster in the browser than the same page loading multiple small images, due to the overhead involved in requesting each image from the web server. The problem is
NP-complete In computational complexity theory, a problem is NP-complete when: # it is a problem for which the correctness of each solution can be verified quickly (namely, in polynomial time) and a brute-force search algorithm can find a solution by trying ...
in general, but there are fast algorithms for solving small instances.


Related problems

* Guillotine cutting is a variant of rectangle packing, with the additional constraint that the rectangles in the packing should be separable using only ''guillotine cuts''. *
Maximum disjoint set In computational geometry, a maximum disjoint set (MDS) is a largest set of non-overlapping geometric shapes selected from a given set of candidate shapes. Every set of non-overlapping shapes is an independent set in the intersection graph of the ...
(or Maximum independent set) is a problem in which both the sizes and the locations of the input rectangles are fixed, and the goal is to select a largest sum of non-overlapping rectangles. In contrast, in rectangle packing (as in real-life packing problems) the sizes of the rectangles are given, but their locations are flexible. Some papers use the term "packing" even when the locations are fixed.{{Cite journal , last1=Chan , first1=T. M. , year=2003 , title=Polynomial-time approximation schemes for packing and piercing fat objects , journal=Journal of Algorithms , volume=46 , issue=2 , pages=178–189 , citeseerx=10.1.1.21.5344 , doi=10.1016/s0196-6774(02)00294-8 * Circle packing in a rectangle *
Square packing in a square Square packing in a square is a packing problem where the objective is to determine how many squares of side one (unit squares) can be packed into a square of side . If is an integer, the answer is , but the precise, or even asymptotic, amount ...
*
De Bruijn's theorem In a 1969 paper, Dutch mathematician Nicolaas Govert de Bruijn proved several results about packing congruent rectangular bricks (of any dimension) into larger rectangular boxes, in such a way that no space is left over. One of these results is n ...
: packing congruent rectangular bricks of any dimension into rectangular boxes.


References

Packing problems Geometric algorithms NP-hard problems