Geometric packing and covering problems arise in a wide range of natural applications. They also have a long history of spawning many demanding (and often still unsolved) mathematical challenges. These difficulties are also notable from an algorithmic perspective, as relatively straightforward one-dimensional variants of packing and covering are already -hard [garey1975complexity]; however, deciding whether a given set of one-dimensional segments can be packed into a given interval can be checked by computing their total length. This simple criterion is no longer available for two-dimensional, geometric packing or covering problems, for which the total area often does not suffice to decide feasibility of a set, making it necessary to provide an explicit packing or covering. A recent result by Abrahamsen et al. [till2DER] indicates that these difficulties have far-reaching consequences: Two-dimensional packing problems are -hard, so they are unlikely to even belong to .
We provide a provably optimal answer for a natural and previously unsolved case of tight worst-case area bounds, based on the notion of critical packing density: What is the largest number , such that any set of squares with a total area of at most can always be packed (in a not necessarily axis-parallel fashion) into a disk of area 1, regardless of the individual sizes of the squares? We show the following theorem that implies for squares in a disk.
theoremcrit Every set of squares with a total area of at most can be packed into the unit disk. This is worst-case optimal, i.e., for every there exists a set of squares with total area that cannot be packed into the unit disk.
This critical density is of mathematical importance, as it settles the last open case of packing circular or square objects into a circular or square container. fig:overview provides an overview of the critical densities in similar settings, i.e., the critical density for packing squares in a square (), disks in a square (), and disks in a disk ().
This result is also of algorithmic interest, because it provides a simple sufficient criterion for feasibility. Note that the previous results illustrated in fig:overview benefitted from recursive subdivisions of a square container into subpieces bounded by straight lines, or from recursion based on the similarity of objects and container when both are disks; neither applies when objects are squares and the container is a disk. This gives our approach added methodical significance, as it showcases a general framework for establishing computer-assisted proofs for difficult packing problems for which concise manual arguments may be elusive.
A proof of thm:mainAlgo consists of (i) a class of instances that provide the upper bound of for the critical packing density and (ii) an algorithm that achieves the matching lower bound for by packing any set of squares with a total area of at most into the unit disk. The first part is relatively simple: As shown in fig:overview(d), a critical configuration consists of two squares of side length and a disk of radius 1. It is easy to see that any infinitesimally larger square (of side length for any ) must contain the center of in its interior, so two such squares cannot be packed.
The remainder of our paper focuses on the difficult part: providing a strategy for packing sets of squares into a disk (described in sec:algorithm), and then proving that any set of squares with a total area of at most can indeed be packed into the unit disk. This proof is set up with two sets of tools: In sec:interval-arithmetic-proofs, we describe a general technique that we employed for automated parts of our proof, while sec:analysis-subroutines provides a number of helpful lemmas. sec:analysis-algorithm gives an outline of the actual analysis of our algorithm. Further technical details of these parts are provided in sec:details-analysis-subroutines (for the tools of sec:analysis-subroutines) and in sec:details-analysis-algorithm (for the main proof of sec:analysis-algorithm).
1.1 Related work: Geometric packing
Problems of geometric packing have been studied for a long time. Providing a survey that does justice to the wide range of relevant work goes beyond the scope of this paper; therefore, we strictly focus on very closely related results, in particular, concerning critical packing density. We refer to Fejes Tóth [toth1999recent, toth20172], Lodi, Martello and Monaci [LMM2002two], Brass, Moser and Pach [brass2006research] and Böröczky [boroczky2004finite] for more comprehensive surveys.
Even the decision problem whether it is possible to pack a given set of squares into the unit square was shown to be strongly -complete by Leung et al. [LTWYC1990packing], using a reduction from 3-Partition. Already in 1967, Moon and Moser [MM1967some] proved that it is possible to pack a set of squares into the unit square if their total area does not exceed . This bound is best possible, because two squares even infinitesimally larger than the ones shown in fig:overview(a) cannot be packed. The proof is based on a simple recursive argument.
For the scenario with circular objects, Demaine, Fekete, and Lang [DFL2010circle] showed in 2010 that deciding whether a given set of disks can be packed into a unit square is -hard. Using a recursive procedure for partitioning the container into triangular pieces, Morr, Fekete and Scheffer [fekete:splitpacking, morr2017split] proved that the critical packing density of disks in a square is .
More recently, Fekete, Keldenich and Scheffer [fks-pddow-19] established the critical packing density of disks into a disk. Employing a number of algorithmic techniques in combination with some interval arithmetic and computer-assisted case checking, they proved that the critical packing density of disks in a disk is ; they also provide a video including an animated overview [bfk+-pgoow-19]. In a similar manner, Fekete et al. [fgk+-wcocrd-20] established a closed-form description of the total disk area that is sometimes necessary and always sufficient to cover a rectangle depending on its aspect ratio.
Note that the main objective of this line of research is to compute tight worst-case bounds. For specific instances, a packing may still be possible, even if the density is higher; this also implies that proofs of infeasibility for specific instances may be trickier. However, the idea of using the total item volume for computing packing bounds can still be applied. See the work by Fekete and Schepers [fs-ncflb-01, fs-gfbhd-04], which shows how a modified volume for geometric objects can be computed, yielding good lower bounds for one- or higher-dimensional scenarios.
1.2 Related work: Interval arithmetic and computer-assisted proofs
Establishing tight worst-case bounds for packing problems needs to overcome two main difficulties. The first is to deal with the need for accurate computation in the presence of potentially complicated coordinates; the second is the tremendous size of a full case analysis for a complete proof.
Developing methods for both of these challenges has a long tradition in mathematics. One of the first instances of interval arithmetic is Archimedes’s classic proof [pi] that , establishing a narrow interval for the fundamental constant of geometry. This entails dealing with inaccurate computation not merely by giving a close approximation, but by establishing an interval for the correct value, which can be used for valid lower and upper bounds for subsequent computations.
Employing electronic devices (e.g., calculators or computer algebra) for mathematical arguments is a well-established method for eliminating tedious, error-prone manual calculations. A famous milestone for the role of computers in theorem proving itself is the confirmation of the Four Color Theorem, a tantalizing open problem for more than 100 years [wilson]. While the first pair of papers by Appel and Haken [AH1, AH2] was still disputed, the universally accepted proof by Robertson et al. [RSST] still relies on extensive use of automated checking.
Another example is the resolution of the Kepler conjecture by Hales et al. [kepler_17]: While the first version of the proof [kepler_05] was still met with some skepticism, the revised and cleaned up variant [kepler_17] fits the mold of a more traditional proof, despite relying both on combinatorial results and computational case checking.
Other instances of classic geometric problems that were resolved with the help of computer-assisted proofs are a tight bound for the Erdős-Szekeres problem for the existence of convex paths in planar sets of 17 points [szekeres:computer], the double bubble theorem by Hutchings et al. [hutchings:bubble] (the shape that encloses and separates two given volumes and has the minimum possible surface area is a standard double bubble, i.e., three spherical surfaces meeting at angles of on a common disk), or the proof of -hardness of finding a minimum-weight triangulation (MWT) of a planar point set by Mulzer and Rote [mulzer:minimum].
Further examples in the context of packing and covering include a branch-and-bound approach for covering of polygons by not necessarily congruent disks with prescribed centers and a minimal sum of radii by Bánhelyi et al. [Bnhelyi2015OptimalCC].
2 A worst-case optimal algorithm
Now we describe Layer Packing, our worst-case optimal algorithm for packing squares into the unit disk . The basic idea is to combine refined variants of basic techniques (such as Shelf Packing) in several directions, subdividing the packing area into multiple geometric layers and components.
2.1 Outline of Layer Packing
By , we denote a sequence of squares and simultaneously their side lengths and assume that is a sorted sequence. Layer Packing distinguishes three cases that depend on the sizes of the first few, largest squares; see fig:Alg for illustrations.
- (C 1)
If , we place a square of side length concentric into and place one square of side length , , to each side of , see fig:Alg(a). The four largest squares are placed in these containers . All other squares are packed into using Shelf Packing.
- (C 2)
If and , let be four squares of side length that are placed into as depicted in fig:Alg(b). Furthermore, let be a square of side length that can be packed into in addition to ; see fig:Alg(b). For , is the only square packed into ; this is possible because . All other squares are packed into using Shelf Packing.
- (C 3)
In the remaining cases, we make extensive use of a refined shelf packing approach. Specifically, the largest square is packed into as high as possible, see Figures 2(c) and 3. The bottom side of induces a horizontal split of into a top and a bottom part, which are then filled by two subroutines called Top Packing and Bottom Packing, described in sec:subroutines. For each , we then
- (C 3a)
use Top Packing to pack if possible,
- (C 3b)
else we use Bottom Packing to pack .
In the remainder of the paper, we prove that Layer Packing only fails to pack a sequence of squares if its total area exceeds the critical bound of .
2.2 Subroutines of Layer Packing
Layer Packing employs a number of different subroutines.
- Refined Shelf Packing
The greedy-type packing procedure Shelf Packing, employed by Moon and Moser [MM1967some], packs objects by decreasing size; see the top of fig:overview(a). At each stage, there is a (w.l.o.g. horizontal) straight cut that separates the unused portion of the container from a “shelf” into which the next square is packed. The height of a shelf is determined by the first packed object. Subsequent objects are packed next to each other, until an object no longer fits into the current shelf; in this case, a new shelf is opened on top of the previous one. For Layer Packing, we use two modifications.
(1) Parts of the shelf boundaries may be circular arcs; however, we still have a supporting straight axis-parallel boundary and a second, orthogonal straight boundary.
(2) Our refined shelf packing uses the axis-parallel boundary line of a shelf as a support line for packing squares; in case of a collision with the circular boundary, we may move a square towards the middle of a shelf if this allows packing it. Note that this may only occur in shelves containing the horizontal diameter.
- Top Packing
The first and largest square is packed as high as possible into ; see fig:segmentpacking(a). Then the horizontal line through the bottom of cuts the container into a top part that contains , with two congruent empty pockets and left and right of ; and a bottom part. Each pocket has two straight axis-parallel boundaries, and . By , we denote the largest square that fits into either pocket. For large , the bottom side of does not lie on the same height as the bottom side of ; in that case, we ignore the parts of and that lie below ; see fig:segmentpacking(e). We use Refined Shelf Packing with shelves parallel to the shorter boundary among and , as shown in fig:segmentpacking(b) and (c). If a square does not fit into either pocket, it is packed into the bottom part.
- Bottom Packing
A square that does not fit into the top part of is packed into the bottom part. For this purpose, we use (horizontal) SubContainer Slicing, and (vertical) SubContainer Packing within each subcontainer; see fig:TopBottom for the overall picture.
- SubContainer Slicing
For packing squares in the bottom part of , SubContainer Slicing subdivides into smaller containers , by using straight horizontal cuts; see fig:slicing(a). The height of a subcontainer is determined by the first square packed into it.
- SubContainer Packing
Within each subcontainer, we use Refined Shelf Packing with vertical shelves. These shelves are packed from the longer of the two horizontal cuts, i.e., to pack , we start from the boundary that is closer to the disk center; see fig:slicing(d).
3 Proofs based on interval arithmetic
In interval arithmetic, operations like addition, multiplication or taking the square root are performed on real intervals instead of real numbers. When applied to intervals, an operation results in the smallest interval that contains all possible values of for . In a practical implementation on computers with finite precision, computing the smallest such interval is not always possible. However, using appropriate rounding modes or error bounds, it is still possible to compute an interval that over-approximates the resulting interval, i.e., contains all possible outcomes of the corresponding real operation. Predicates such as can also be evaluated on intervals. The result is a subset of containing all possible outcomes of for . This allows evaluating quantifier-free formulas on the Cartesian product of intervals in an over-approximative way.
In many cases throughout this paper, we want to prove that a given non-linear system of real constraints over a bounded -dimensional space is unsatisfiable. This space is typically spanned by a set of real variables. Conceptually, to do this in an automatic fashion, we subdivide into a sufficiently large number of -dimensional cuboids. Each such cuboid is defined by an interval for each of the real variables spanning . We then apply interval arithmetic to each such cuboid to find a set of constraints that together eliminate all points of , thus proving that no point in satisfies all our constraints for a counterexample.
To improve the efficiency of this approach, our implementation of the basic concept is optimized in several ways. For instance, the subdivision proceeds in a tree-like fashion according to a fixed ordering of the variables spanning . If variables suffice to exclude a part of , we do not split on that part. Furthermore, we adaptively increase the local fineness of our subdivision if a coarser subdivision does not suffice for some part of .
Overall, this leads to a limited number of automated proofs111Source code available at https://github.com/phillip-keldenich/squares-in-disk.; for some of these, manual checking would also be feasible, but would involve many case distinctions and would be tedious and unsatisfying.
4 Analysis of subroutines
In the following, we establish a number of bounds for the subroutines from sec:subroutines that we use to prove the performance guarantee for Layer Packing.
4.1 Shelf Packing
In several places we make use of the following classic result regarding Shelf Packing. [[MM1967some]]lemmashelfpacking Shelf Packing packs every sequence of squares with a total area of at most into an -rectangle with . If the side length of the largest square is small compared to the size of the container, one can guarantee a higher packing density. A proof is presented in ssec:details-shelf-packing. lemmashelfpackingtwo Any finite set of squares with largest square is packed by Shelf Packing into a unit square, provided its total area is at most .
4.2 Top Packing
We prove the following lower bound on the square area packed by Top Packing, as long as at least one square fits into the left pocket . By , we denote the side length of the largest square that can be packed into or ; see fig:t-t1-sigmaApp(c)–(e). lemmaanapocketpacking Let be a sequence of squares for which Layer Packing fails to pack . If , then Top Packing packs squares of total area at least .
Intuitively, the proof makes use of the Shelf Packing bound on the squares inscribed in and , but additionally uses the gaps in and to bound the square area packed into each of and by .
Before presenting its proof, we make some helpful observations. We assume the center of our unit disk lies at the origin of our coordinate system. Recall that Top Packing packs the largest square as high as possible into . This implies that the center of is on the vertical line . For some , we denote by the side length of the largest square with center on and bottom on that fits into ; see fig:t-t1-sigmaApp(a).
The inverse function of describes the highest possible -coordinate of the bottom side of a square of side length ; see fig:t-t1-sigmaApp(b). Thus, Top Packing places the bottom-left corner of at ; note that this can be below or above the center of . Furthermore, recall that Top Packing packs the remaining disks into the pockets and induced by placing ; see fig:t-t1-sigmaApp(c).
Now, we present explicit formulas. Solving the equations in fig:t-t1-sigmaApp(a)–(b), we get
To compute , we observe the following. Below some threshold , the bottom side of the inscribed square of lies on the horizontal line and its top left corner touches ; see fig:t-t1-sigmaApp(c). At the threshold , both left corners of the inscribed square of touch the disk; see fig:t-t1-sigmaApp(d). For , the center of ’s inscribed square lies on and both left corners touch the disk; see fig:t-t1-sigmaApp(e). Overall, this yields
Now we are ready to present a proof of lem:anapocketpacking.
[Proof of lem:anapocketpacking] We begin by observing that would fit into either or ; as we fail to pack , and must contain other squares. In the following, we prove that Top Packing packs squares of area into . An analogous argument works for , implying an overall bound of .
By , we denote the length of the bottom boundary of ; see Figure 6(a). W.l.o.g., we assume ; the other case is symmetric. In other words, we assume that the bottom boundary of is shorter than its right boundary, which means that we are using horizontal shelves that we fill from right to left as depicted in fig:segmentpacking(b).
Consider the subsequence of , where are the squares packed by Top Packing into before height is (strictly) exceeded, and is the next square that we try to pack into . We observe that may or may not be packed into by Top Packing, and that by , i.e., after placing the first square, height is not exceeded. We make use of the following lemma, proved by interval arithmetic. [Automatic Analysis for Top Packing ] Let , and . Furthermore, let
see fig:lemma_interval1. Let and . Then, for all , we have (1) and (2) .
If , the packed area inside is at least . Thus, in the following, we assume .
Furthermore, if , we can apply lem:summaryInterval1 (1), showing that can be packed into by Top Packing; see Figure 6(a). In particular, can always be packed into such that its bottom side lies on height and its right side touches . The total area packed by Top Packing into is at least the total area packed by Shelf Packing into the square of area ; here we use the fact that the height of the bottom segment of a pocket and the bottom segment of the contained square coincide, see also fig:segmentpacking(e). Because packing exceeds height , lem:shelfpackingtwo implies that the total area of and the squares already packed into exceeds . Thus, in the following, we assume .
If , at least four squares are packed into by Refined Shelf Packing before height is exceeded. Consequently, the total packed area is at least . Thus, in the following we assume .
Now let us assume that only one shelf is constructed before height is exceeded. That shelf has height and thus we must have . We use lem:summaryInterval1 (2) to prove that we can pack on top of the first shelf, assuming that are as large as possible; see Figure 6(b). Thus, the total area packed into is at least .
Otherwise, at least two shelves are constructed before height is exceeded. The first shelf has height . The second shelf contains at least two squares because its height is at most , and thus at most half of its width. Thus, the area packed into is at least , concluding the proof of lem:anapocketpacking.
4.3 Subcontainer Packing
For the analysis of SubContainer Packing, let be the subcontainers constructed by Bottom Packing and let be the maximal rectangles contained in ; see fig:scp-overview.
For , let and denote the height and the width of . Recall that simultaneously denotes the height of and the first square packed into . Let be the largest square that could be packed below . We define , so always denotes the first square that did not fit into . Furthermore, we denote the total area of squares packed into by . We establish several lower bounds on this area . One such bound is derived from the following observation.
The total area packed by SubContainer Packing into is at least the total area packed by Shelf Packing into .
If the width of is at least twice its height, the following lemma improves on this bound. Its proof is presented in app:scp. lemmaAone For every sequence of squares for which Layer Packing constructs at least subcontainers and fails to pack , if , we can bound the area packed into by
We always pack at least the square into . As , if , we pack at least two squares into : Let be the second square we consider packing into . If and do not fit into , then , as we would open a new subcontainer for . This contradicts , as and fit into and thus into . Summarizing, we can extend as follows. lemmaAeleven For every sequence of squares for which Layer Packing constructs at least subcontainers and fails to pack , we can bound the area packed into by
For the last lemma of this subsection, we introduce some useful notation. Let be the -coordinates of the upper and the lower side of and let . When contains the center of the disk, i.e., , denotes the distance of the origin to the nearer side of , see fig:functionG(b) and (c). The maximal -coordinate of the left side of a square of side length in is determined by
The -coordinate of the right side of the first square packed into subcontainer is . Thus, as did not fit into , we can lower bound the total width of squares packed into after , see fig:lowerBoundA2(a), by
lemmaAtwoBound For every sequence of squares for which Layer Packing constructs at least subcontainers and fails to pack , we can bound the area packed into by
If , both bounds (8.1) and (8.2) simplify to and are valid, because is packed into . Thus, let us assume . This implies that there are at least two squares packed into ; otherwise, would fit into . As is a lower bound on the total width of squares packed into after and is a bound on their height, we obtain bound (8.1); see fig:lowerBoundA2(a).
Furthermore, if exactly two squares are packed into , can be used as lower bound on the area of the second square, see fig:lowerBoundA2(b). Otherwise, at least three squares are packed into , and we can use to bound their area, see fig:lowerBoundA2(c). Combining these two cases yields bound (8.2). We combine these previous bounds into a general lower bound for . corollarycombined For every sequence of squares for which Layer Packing constructs at least subcontainers and fails to pack , we can bound the area packed into by
5 Analysis of the main algorithm
In this section, we prove our main result using the tools provided in sec:interval-arithmetic-proofs,sec:analysis-subroutines. On the highest level, the proof consists of three parts corresponding to the three cases that our algorithm distinguishes.
5.1 Analysis of (C 1)
Recall that in case (C 1), we place a container square of side length into , and pack the first four squares into pockets outside and all remaining disks into using Shelf Packing; see fig:Alg(a).
lemmacorrectnessStepOne If Layer Packing fails to pack a sequence of squares with , the total area of the squares exceeds . Consider scaling down all side lengths by a factor of , such that is the unit square and . As is the first square packed by Shelf Packing into , lem:shelfpackingtwo implies that the total area packed into the scaled is at least with derivative which is minimized for , where . Thus, in the non-scaled configuration, the area packed is at least , concluding the proof.
5.2 Analysis of (C 2)
Recall that in case (C 2), we pack the four largest squares into the squares ; all other squares are packed into a square container on top of them; see fig:Alg(b). lemmacorrectnessStepTwo If Layer Packing fails to pack a sequence of squares with and , the total area of the squares exceeds . By assumption, the total area of the squares is at least . As has an area of , lem:shelfpacking implies that Shelf Packing (and thus Layer Packing) only fails to pack all remaining squares into if their area exceeds . Consequently, the total area of the squares exceeds , concluding the proof.
5.3 Analysis of (C 3)
Recall that denotes the largest square that could be packed below the last subcontainer constructed by Bottom Packing, as illustrated in fig:scp-overview or in fig:formula-z, where we have reflected the instance along the x-axis.
We consider a sequence of squares of total area that Layer Packing fails to pack, and assume w.l.o.g. that is packed. This implies , where denotes the side length of the largest square that could be packed below the last subcontainer constructed by Bottom Packing; otherwise, a further subcontainer is constructed. We have ; see fig:formula-z(a).
By , we denote the maximum width of a rectangle that can be placed in with top side at and height ; see fig:formula-z(b). Thus, we can express the width of the rectangle inscribed in some subcontainer in terms of as
Recall that denotes the side length of the largest squares that fits into the pockets and as illustrated in fig:t-t1-sigmaApp(c). In order to distinguish whether Top Packing has packed any squares into the pockets, we consider the function
which describes the total square area that Top Packing is guaranteed to pack due to lem:anapocketpacking.
For the analysis of Case (C 3), we distinguish cases depending on the number of subcontainers constructed by Bottom Packing. Specifically, we consider the cases , and .
5.3.1 Analysis for no subcontainer
lemmaanaNoStrip If Layer Packing fails to pack a sequence of squares and Bottom Packing does not construct a subcontainer, the total area of the squares exceeds . Because the algorithm fails to construct a first subcontainer in the bottom part, it follows that placing as far to the bottom as possible yields an overlap with . However, the minimum value for for two overlapping squares packed into a disk is attained for . This corresponds to the worst-case configuration, implying that the total area of and exceeds .
5.3.2 Analysis for one subcontainer
lemmaanaOneRow If Layer Packing fails to pack a sequence of squares and Bottom Packing constructs exactly one subcontainer, the total area of the squares exceeds . Combining lem:anapocketpacking,cor:combined allows us to bound the area of by
where if , and if . Furthermore, we know , because Layer Packing fails to pack . Moreover, we claim that at least one of the following conditions must hold: , , or . Assume for contradiction that neither of these conditions hold. By , we know that at least two squares are packed into the first subcontainer. One of these squares has area , and the other has area at least . In particular, this implies that the algorithm packs and . This implies and . Thus we have , which together with implies that we are in Case (C 2) of our algorithm. This is a contradiction, because we only construct subcontainers in Case (C 3). Thus the following lemma, proved automatically using interval arithmetic, proves that these conditions are sufficient to ensure . [One Subcontainer, Automatic Analysis for Lemma 5.3.2] Let . For all with , and
we have .
5.3.3 Analysis for two to four subcontainers
lemmaanaTwoThreeFourRows If Layer Packing fails to pack a sequence of squares and Bottom Packing constructs subcontainers, the total area of the squares exceeds . We use similar ideas as in the proof of lem:anaOneRow. We bound the area packed by Top Packing by using lem:anapocketpacking. Furthermore, we use cor:combined to bound the area packed into each of the subcontainers by
where . We can express in terms of and . In total, for subcontainers, this yields the bound
Finally, we know because the algorithm fails to pack . Thus, the following lemma, proved automatically using interval arithmetic, suffices to complete the proof of lem:anaTwoThreeFourRows. [Automatic Analysis for Lemma 5.3.3] Let .
For all with and and , we have .
For all with and and , we have .
For all with and and , we have .
We defer the analysis for five or more subcontainers to sec:details-analysis-algorithm. This completes the analysis of (C 3) and thus the proof of our main result.
We have established the critical density for packing squares into a disk: Any set of squares of total area at most can be packed into a unit disk. As shown by our lower bound example, this guarantee is best-possible, i.e., it cannot be improved. The proof is based on an algorithm that subdivides the disk into horizontal subcontainers and uses a refined shelf packing scheme. The correctness of this algorithm is shown by careful manual analysis, complemented by a computer-assisted part that is based on interval arithmetic.
There is a variety of interesting directions for future research. Of particular interest is the critical density for packing squares of bounded size into a disk, which will result in a higher packing density; a more general problem concerns the critical packing density for packing other types of objects of bounded size into other types of containers. Other questions arise from considering questions in three- or even higher-dimensional space. We are optimistic that many of our techniques will be useful for settling these problems.
7 Analysis of Subroutines: Details
In this section, we provide the details of the analysis of our subroutines.
7.1 Shelf Packing
* We show that if a set of squares cannot be packed, then its area exceeds . To this end, we assume that the last square in the sequence cannot be packed by Shelf Packing, as illustrated in fig:shelfbound(a).
We denote the height of the first square in shelf by . Let be the total height of the arrangement when the last square of the sequence cannot be placed in a feasible shelf and is placed in an additional shelf that exceeds the height of the container, i.e., the last square has height . For computing the area of the packed squares, we account the first square of each shelf with the preceding shelf, see fig:shelfbound(a). Then, for , in shelf the area of the packed squares is at least as depicted in illustrated by fig:shelfbound(b). We can conclude that the total packed area is
7.2 Subcontainer Packing
In this section, we provide the proof of cor:Aone. *
The proof consists of three lemmas, each establishing the validity of one of the three lower bounds combined in . In the setting of cor:Aone, we are dealing with a sequence , which we fail to pack completely. Furthermore, we construct subcontainers; thus, there must be a square that is placed into , and a subsequence of squares that we try to pack into , where is the last square that we can pack into , and does not fit.
lemmashelfpackingnew If , and , then the total area of packed into is at least . We know that is packed. If , then and hence, the lemma holds.
Thus, it remains to consider the case . If , we consider the part of the rectangle that remains after removing . Because is not packed by SubContainer Packing into , lem:shelfpacking,lem:betterShelfPacking imply that the total area of is at least . Consequently, the total area of is at least
Thus, we may restrict ourselves to