Thesis Rectangle Packing PDF
Thesis Rectangle Packing PDF
presented by
Salvatore Ingala
October 2017
Dissertation Committee
i
I certify that except where due acknowledgement has been given, the work
presented in this thesis is that of the author alone; the work has not been sub-
mitted previously, in whole or in part, to qualify for any other academic award;
and the content of the thesis is the result of work which has been carried out
since the official commencement date of the approved research program.
Salvatore Ingala
Lugano, 27 October 2017
ii
Abstract
In rectangle packing problems we are given the task of positioning some axis-aligned
rectangles inside a given plane region, so that they do not overlap with each other.
In the Maximum Weight Independent Set of Rectangles (MWISR) problem, their
position is already fixed and we can only select which rectangles to choose, while
trying to maximize their total weight. In the Strip Packing problem, we have to
pack all the given rectangles in a rectangular region of fixed width, while minimizing
its height. In the 2-Dimensional Geometric Knapsack (2DGK) problem, the target
region is a square of a given size, and our goal is to select and pack a subset of the
given rectangles of maximum weight.
All of the above problems are NP-hard, and a lot of research has approached them
by trying to find efficient approximation algorithms. Besides their intrinsic interest
as natural mathematical problems, geometric packing has numerous applications in
settings like map labeling, resource allocation, data mining, cutting stock, VLSI
design, advertisement placement, and so on.
We study a generalization of MWISR and use it to obtain improved approximation
algorithms for a resource allocation problem called bagUFP.
We revisit some classical results on Strip Packing and 2DGK, by proposing a
framework based on smaller containers that are packed with simpler rules; while
variations of this scheme are indeed a standard technique in this area, we abstract
away some of the problem-specific differences, obtaining simpler and cleaner algo-
rithms that work unchanged for different problems. In this framework, we obtain
improved approximation algorithms for a variant of Strip Packing where one is al-
lowed pseudo-polynomial time, and for a variant of 2DGK where one is allowed to
rotate the given rectangles by 90◦ (thereby swapping width and height). For the
latter, we propose the first algorithms with approximation factor better than 2.
For the main variant of 2DGK (without 90◦ rotations), a container-based ap-
proach seems to face a natural barrier of 2 in the approximation factor. Thus, we
consider a generalized kind of packing that combines container packings with another
packing problem that we call L-packing problem, where we have to pack rectangles in
an L-shaped region of the plane. By finding a (1 + ε)-approximation for this problem
and exploiting the combinatorial structure of the 2DGK problem, we obtain the first
algorithms that break the barrier of 2 for the approximation factor of this problem.
iii
iv
Acknowledgements
v
vi
Contents
1 Introduction 1
1.1 Approximation algorithms . . . . . . . . . . . . . . . . . . . . . 3
1.2 Lower bounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3 Pseudo-polynomial time . . . . . . . . . . . . . . . . . . . . . . 6
1.4 Rectangle packing problems . . . . . . . . . . . . . . . . . . . . 7
1.4.1 Strip Packing . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4.2 2-Dimensional Geometric Knapsack . . . . . . . . . . . . 11
1.4.3 Related packing problems . . . . . . . . . . . . . . . . . 14
1.5 Summary of our results and outline of this thesis . . . . . . . . 17
2 Preliminaries 19
2.1 Next Fit Decreasing Height . . . . . . . . . . . . . . . . . . . . 19
2.2 Steinberg’s algorithm . . . . . . . . . . . . . . . . . . . . . . . . 21
2.3 The Maximum Generalized Assignment Problem . . . . . . . . . 21
2.4 Container packings . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.4.1 Rounding containers . . . . . . . . . . . . . . . . . . . . 26
2.4.2 Packing rectangles in containers . . . . . . . . . . . . . . 28
2.5 Packing Rectangles with Resource Augmentation . . . . . . . . 29
2.5.1 Containers for short-high rectangles . . . . . . . . . . . . 31
2.5.2 Fractional packing with O(1) containers . . . . . . . . . 33
2.5.3 Existence of an integral packing . . . . . . . . . . . . . . 35
2.5.4 Rounding down horizontal and vertical containers . . . . 35
2.5.5 Packing short-narrow rectangles . . . . . . . . . . . . . . 37
vii
viii Contents
Conclusions 145
Bibliography 147
Chapter 1
Introduction
The development of the theory of NP-hardness led for the first time to the
understanding that many natural discrete optimization problems are really
difficult to solve. In particular, assuming that P 6= NP, it is impossible to
provide a correct algorithm that is (1) efficient and (2) optimal (3) in the worst
case.
Yet, this knowledge is not fully satisfactory: industry still needs solutions,
and theorists want to know what can be achieved, if an efficient exact solution
is impossible. Thus, a lot of research has been devoted to techniques to solve
NP-hard problem while relaxing at least one of the above conditions.
One approach is to relax constraint (1), and design algorithms that re-
quire super-polynomial time, but are as fast as possible. For example, while a
naive solution for the Traveling Salesman Problem (TSP) requires time at least
Ω(n!) = 2Ω(n log n) in order to try all the possible permutations, the celebrated
Bellman-Held-Karp algorithm uses Dynamic Programming to reduce the run-
ning time to O(n2 2n ). See Fomin and Kratsch [2010] for a compendium of this
kind of algorithms.
A prolific line of research, first studied systematically in Downey and Fellows
[1999], looks for algorithms whose running time is exponential in the size of
the input, but it is polynomial if some parameter of the instance is fixed. For
example, k-Vertex Cover can be solved in time O(2k n), which is exponential if
k is unbounded (since k could be as big as Ω(n)), but is polynomial for a fixed
k. A modern and comprehensive textbook on this field is Cygan et al. [2015].
For the practical purpose of solving real-world instances, heuristic tech-
niques (e.g.: simulated annealing, tabu search, ant colony optimization, ge-
netic algorithms; see for example Talbi [2009]), or search algorithms like branch
and bound (Hromkovic [2003]) often provide satisfactory results. While these
1
2
and, vice versa, other ones that admit arbitrarily good approximations.
The study of approximation algorithms has led to a rich and complex taxon-
omy of NP-hard problems, and stimulated the development of new powerful
algorithmic techniques and analytical tools in the attempt to close the gap
between the best negative (i. e. hardness of approximation) and positive (ap-
proximation algorithms) results.
While the above discussion identifies some directions that are established
and well developed in the research community, no hard boundaries exist be-
tween the above mentioned fields. In fact, especially in recent times, many
interesting results have been published that combine several approaches, for
example: parameterized approximation algorithms, approximation algorithms
in super-polynomial time, fast approximation algorithm for polynomial time
problems, and so on.
Thus, with our convention, if opt is the objective function value of the
optimal solution, an algorithm is an α-approximation if it always returns a
solution whose value is at most α · opt for a minimization problem, or at least
opt/α for a maximization problem.1
Note that α could, in general, be a growing function of the input size, and
not necessarily a constant number.
For some problems, it is possible to find approximate solutions that are
arbitrarily close to the optimal solution. More formally:
For some problems, better approximation ratios can be found if one assumes
that the solution is large enough. Formally, for a minimization problem Π, the
asymptotic approximation ratio ρ∞ A of an algorithm A is defined as:
apx(I)
ρ∞
A = lim sup : opt(I) ≥ n
n→∞ I opt(I)
where apx(I) and opt(I) are, respectively, the objective function value of the
solution returned by A on the instance I, and that of an optimal solution to I.
Similarly to the definition of PTAS, we say that an algorithm A is an
Asymptotic PTAS or APTAS for problem Π if A(ε, ·) is an asymptotic (1 + ε)-
approximation for any fixed ε > 0.
Table 1.1. Examples of known upper and lower bounds. The Õ notation hides
poly-logarithmic factors.
recently, hardness results have been proved under the Exponential Time Hy-
pothesis (ETH), that is, the assumption that SAT cannot be solved in sub-
exponential time. Another strong hardness assumption is the Unique Games
Conjecture (UGC), proposed by Khot [2002]. Clearly, stronger assumptions
might lead to stronger results, but they are also considered less likely to be
true; hence, there is a strong push for results that are as strong as possible,
while relying on the weakest possible assumption (ideally, P 6= NP).
Table 1.1 presents some classical problems together with the best known
upper and lower bounds.
The existence of a QPTAS for a problem is sometimes seen as a hint that a
PTAS might exist: in fact, it implies that the problem is not APX-hard unless
NP ⊆ DTIME(npoly log n ).
absolute value of the integers in the instance, and n is the size of the instance.
unary notation.
Clearly, this is a relaxation of the polynomial time requirement; thus, a
problem might become significantly easier if PPT is allowed. For example, the
knapsack problem is NP-hard, but a classical Dynamic Programming approach
can solve it exactly in PPT.
A problem that is NP-hard but can be solved in PPT is called weakly NP-
hard. A problem that does not admit an exact PPT algorithm unless P = NP
is called strongly NP-hard.
Studying PPT algorithms is interesting also in the context of approximation
algorithms, and it has recently been a more frequent trend in the research
community. Note that the standard hardness result do not always apply. Some
problem, nonetheless, are hard to solve even in this relaxed model; one such
problem is the Strip Packing problem, which we introduce in the next section
and will be discussed in detail in Chapter 3.
There is only one case of rectangle rotations that is compatible with or-
thogonal packings: 90◦ rotations. In fact, for the packing problems that we
consider, there are two variations: one where rotations are not allowed, as in
the definition of packing given above; and one where 90◦ rotations are allowed,
that is, one is allowed to swap width and height of a rectangle in the packing.
There is another interesting variant of these packing problem, where we are
interested in packings that can be separated via the so called guillotine cuts,
that is, edge-to-edge cuts parallel to an edge of the box. See Figure 1.2 for
a comparison between a packing with guillotine cuts and a generic packing.
Such constraints are common in scenarios where the packed rectangles are
patches of a material that must be cut, where the availability of a guillotine
cutting sequence simplify the cutting procedure, thereby reducing costs; see for
example Puchinger et al. [2004] and Schneider [1988].
Figure 1.2. A guillotine packing on the left, and packing that cannot be a
guillotine packing on the right.
W W
(obtained when all the rectangles have the same height; see Coffman Jr. et al.
[2013]) and makespan minimization (obtained when all the rectangles have
the same width; see Coffman and Bruno [1976]). The problem has lots of
applications in industrial engineering and computer science, specially in cutting
stock, logistics and scheduling (Kenyon and Rémila [2000]; Harren et al. [2014]).
Recently, there have been several applications of strip packing in electricity
allocation and peak demand reductions in smart-grids; see for example Tang
et al. [2013], Karbasioun et al. [2013] and Ranjan et al. [2015].
A simple reduction from the Partition problem shows that the problem
cannot be approximated within a factor 32 − ε for any ε > 0 in polynomial-time
unless P = NP. This reduction relies on exponentially large (in n) rectangle
widths, and it also applies for the case with rotations.
Let OP T = OP T (R) denote the optimal height for the considered strip
packing instance (R, W ), and hmax = hmax (R) (respectively, wmax = wmax (R))
be the largest height (respectively, width) of any rectangle in R. Most of the
literature on this problem is devoted to the case without rotations. Observe
that, for this case, OP T ≥ hmax , and we can assume that W ≤ nwmax without
loss of generality. The first non-trivial approximation algorithm for strip pack-
ing, with approximation ratio 3, was given by Baker et al. [1980]. The First-
Fit-Decreasing-Height algorithm (FFDH) by Coffman Jr et al. [1980] gives a
2.7-approximation. Sleator [1980] gave an algorithm that generates a pack-
ing of height 2OP T + hmax2
, hence achieving a 2.5-approximation. Afterwards,
Steinberg [1997] and Schiermeyer [1994] independently improved the approxi-
mation ratio to 2. Harren and van Stee [2009] first broke the barrier of 2 with
their 1.9396 approximation. The present best ( 53 + ε)-approximation is due to
Harren et al. [2014].
Nadiradze and Wiese [2016] overcame the 23 -inapproximability barrier by
presenting a ( 75 + )-approximation algorithm running in pseudo-polynomial-
time (PPT). More specifically, they provided an algorithm with running time
O((N n)O(1) ), where N = max{wmax , hmax }4 . In Gálvez, Grandoni, Ingala and
Khan [2016], we improved the approximation factor to 4/3+ε, also generalizing
it to the case with 90◦ rotations; this result is described in Chapter 3. For the
case without rotations, an analogous result was independently obtained by
Jansen and Rau [2017].
As strip packing is strongly NP-hard (see Garey and Johnson [1978]), it
does not admit an exact pseudo-polynomial-time algorithm. Moreover, very
4
For the case without rotations, the polynomial dependence on hmax can indeed be re-
moved with standard techniques.
11 1.4 Rectangle packing problems
by Jansen and Solis-Oba [2009], who achieved an AFPTAS with additive con-
stant only hmax . Sviridenko [2012] obtained a polynomial time algorithm that
√
returns a solution with height at most OP T + O( OP T log OP T ).
The analysis for the asymptotic 2-approximations (for example by NFDH)
also apply to the case with 90◦ rotations. Miyazawa and Wakabayashi [2004]
improved this to a 1.613-approximation, and then Epstein and van Stee [2004b]
proved a 1.5-approximation. Finally, Jansen and van Stee [2005] obtained an
AFPTAS also for this variation of the problem.
The natural generalization of Strip Packing in 3 dimensions has been con-
sidered for the first time by Li and Cheng [1990], who obtained an asymptotic
3.25-approximation. In Li and Cheng [1992], they further improved it to an
asymptotic ratio T∞ 2
≈ 2.89, where T∞ ≈ 1.69 is the so called harmonic con-
stant in the context of bin packing. Bansal et al. [2007] provided an asymp-
totic T∞ -approximation. More recently, Jansen and Prädel [2014] obtained the
currently best known asymptotic 1.5-approximation. In terms of absolute ap-
proximation, the above mentioned result of Li and Cheng [1990] also implies a
45/4-approximation, which was improved to 25/4 in Diedrich et al. [2008].
Like for Strip Packing, the variant with rotations of the problem is also
considered, where one is allowed to rotate the rectangles by 90◦ .
The problem is motivated by several practical applications. For instance,
one might want to place advertisements on a board or a website, or cut rect-
angular pieces from a sheet of some material (in this context, the variant with
rotations is useful when the material does not have a texture, or the texture
itself is rotation invariant). It can also model a scheduling setting where each
rectangle corresponds to a job that needs some “contiguous amount” of a given
resource (memory storage, frequencies, etc.). In all these cases, dealing only
with rectangular shapes is a reasonable simplification.
Caprara and Monaci [2004] gave the first non-trivial approximation for the
problem, obtaining ratio 3 + ε; this result builds on the 2-approximation for
Strip Packing in Steinberg [1997]. Jansen and Zhang [2007] obtained an al-
13 1.4 Rectangle packing problems
On the other hand, the only known hardness was given in Leung et al.
[1990], who proved that an FPTAS is impossible even in the special case of
packing squares into a square. Note that this does not rule out a PTAS.
Better results are known for many special cases. If all the rectangles are
squares, Harren [2006] obtained a (5/4 + ε)-approximation, and Jansen and
Solis-Oba [2008] showed that a PTAS is possible; very recently, Heydrich and
Wiese [2017] obtained an EPTAS. Fishkin et al. [2008] gave a PTAS for rect-
angles in the relaxed model with resource augmentation, that is, where one is
allowed to enlarge the width and the height of the knapsack by a 1 + ε factor.
Jansen and Solis-Oba [2009] showed that the same can be achieved even if only
the width (or only the height) is augmented; we prove a slightly modified ver-
sion of this result in Lemma 14 in Section 2.5. Bansal, Caprara, Jansen, Prädel
and Sviridenko [2009] proved that a PTAS is possible for the special case in
which the profit of each rectangle equals its area, that is, pi := wi hi , for both
the cases with or without rotations. Fishkin et al. [2005] presented a PTAS for
the special case where the height of all the rectangles is much smaller than the
height of the knapsack.
In Chapter 5 we consider the case with rotations, and obtain a (3/2 + ε)-
approximation for the general case, and a (4/3 + ε)-approximation for the
cardinality case.
capacity
Figure 1.6. An instance and a feasible solution of the Storage Allocation Prob-
lem; two rectangles are not packed. Selected rectangles can only be moved
vertically.
• the target region where each selected rectangle must be packed is the set
of points in the positive quadrant that are below a given positive capacity
curve c(·).
See Figure 1.6 for an example. This problems models the allocation of a re-
source that has a contiguous range and that varies over time, like bandwidth
or disk allocation. Each rectangle represents a request to use the resource,
starting at some specified time (the starting x-coordinate of the rectangle) and
for a duration equal to the width of the rectangle. The height of the rectangle
represents the amount of the resource that is requested. Bar-Yehuda et al.
[2013] gave the first constant factor approximation for this problem, with ratio
9 + ε; the best known result, with approximation factor 2 + ε, is due to Mömke
and Wiese [2015].
16 1.4 Rectangle packing problems
a 2-approximation is possible for the case of squares. Then, Harren and van
Stee [2012] showed that a 2-approximation is possible for general rectangles if
rotations are allowed. Note that, due to the NP-hardness mentioned above,
an absolute ratio of 2 is the best possible for any of these problems.
Bansal et al. [2005] proved the surprising result that an asymptotic PTAS
is possible for the version of the problem with guillotine cuts.
Many results are also known in the online version of the above problems;
we omit them here. A recent review of these and other related problems can
be found in Christensen et al. [2017].
Preliminaries
19
20 2.1 Next Fit Decreasing Height
Figure 2.1. A packing obtained using the classical Next Fit Decreasing Height
algorithm.
not fit above in(r) . See Figure 2.1 for an example of packing produced by this
algorithm.
We prove the following known result:
Lemma 1. Let C be a given box of size w × h, and let I 0 be a set of rectangles.
Assume that, for some given parameter ε ∈ (0, 1), for each i ∈ I 0 one has wi ≤
εw and hi ≤ εh. Then NFDH is able to pack in C a subset I 00 ⊆ I 0 of total area
at least a(I 00 ) ≥ min{a(I 0 ), (1 − 2ε)w · h}. In particular, if a(I 0 ) ≤ (1 − 2ε)w · h,
all the rectangles in I 0 are packed.
Proof. The claim trivially holds if all rectangles are packed. Thus suppose
that this is not the case. Observe that r+1 j=1 hin(j) > h, otherwise the rectangle
P
in(r+1) would fit in the next shelf above in(r) ; hence r+1
P
i=2 hin(j) > h − hin(1) ≥
(1 − ε)h. Observe also that the total width of the rectangles packed in each
round j is at least w − εw = (1 − ε)w, since in(j+1) , of width at most εw, does
not fit to the right of in(j+1)−1 . It follows that the total area of the rectangles
packed in round j is at least (w − εw)hn(j+1)−1 , and thus:
r
X r+1
X
00
a(I ) ≥ (1−ε)w·hn(j+1)−1 ≥ (1−ε)w hn(j) ≥ (1−ε)2 w·h ≥ (1−2ε)w·h.
j=1 j=2
timal solution for the maximum generalized assignment problem, where there
are k bins and each of them has capacity at most D.
Proof. For each i ∈ [n] and dj ∈ [cj ] for j ∈ [k], let Si,d1 ,d2 ,...,dk denote a
subset of the set of items {1, 2, . . . , i} packed into the bins such that the profit
is maximized and the capacity of bin j is at most dj . Let P [i, d1 , d2 , . . . , dk ]
denote the profit of Si,d1 ,d2 ,...,dk . Clearly P [1, d1 , d2 , . . . , dk ] is known for all
dj ∈ [cj ] for j ∈ [k]. Moreover, for convenience we define P [i, d1 , d2 , . . . , dk ] = 0
if dj < 0 for any j ∈ [k]. We can compute the value of P [i, d1 , d2 , . . . , dk ] by
using a dynamic program (DP), that exploits the following recurrence:
P [i, d1 , d2 , . . . , dk ] = max{P [i − 1, d1 , d2 , . . . , dk ],
max{pij + P [i − 1, d1 , . . . , dj − sij , . . . , dk ]}}
j
With a similar recurrence, we can easily compute a corresponding set Si,d1 ,d2 ,...,dk .
Qk
Clearly, this dynamic program can be executed in time O n cj = O nDk .
j=1
The following lemma shows that we can also solve GAP optimally even in
polynomial time, if we are allowed a slight violation of the capacity constraints
(that is, in the resource augmentation model).
1+ε k k+1
Lemma 6. There is a O time algorithm for the maximum gen-
ε
n
eralized assignment problem with k bins, which returns a solution with profit at
least p(OP T ) if we are allowed to augment the bin capacities by a (1 + ε)-factor
for any fixed ε > 0.
bins is a feasible solution (with modified bin sizes and item sizes) for the modi-
fied instance, we obtain that p(OP Tmodif ied ) ≥ p(OP T ) and that will conclude
the proof.
Let Sj be the set of items packed in bin j in OP T . Since it is feasible, we
have that i∈Sj sij ≤ cj . Hence,
P
X
0
X sij 1 X
sij ≤ +1 ≤ sij + |Sj |µj
i∈Sj i∈Sj
µj µj i∈S
j
1 (1 + ε)cj
≤ (cj + nµj ) = = c0j
µj µj
Thus OP T is a feasible solution for the modified instance and the above al-
gorithm will return a packing with profit at least p(OP T ) under ε-resource
augmentation.
Now we can show how to employ this result to obtain a PTAS for GAP
without violating the bin capacities. We first prove the following technical
lemma.
Lemma 7. If a set of items Rj is packed in a bin j with capacity cj , then there
exists a set of at most 1/ε2 items Xj , and a set of items Yj with p(Yj ) ≤ εp(Rj )
such that all items in Rj \ (Xj ∪ Yj ) have size at most ε(cj − i∈Xj sij ).
P
Proof. Let Q1 be the set of items i with sij > εcj . If p(Q1 ) ≤ εp(Rj ), we
are done by taking Yj = Q1 and Xj = φ. Otherwise, define Xj := Q1 and
we continue the next iteration with the remaining items. Let Q2 be the items
with size greater than ε(cj − i∈Xj sij ) in Rj \ Xj . If p(Q2 ) ≤ εp(Rj ), we are
P
|Xj | ≤ 1/ε and p(Yj ) ≤ εp(Rj ). On the other hand, after removing Qt , the
2
Proof. Consider a bin j that contains the set Rj of items in the optimal solution
OPT, and let Xj and Yj the sets given by Lemma 7. Let c0j = cj − i∈Xj sij
P
be the residual capacity, so that each element in the set Rj0 := Rj \ (Xj ∪ Yj )
has size in j smaller than εc0j . We divide the residual space into 1/ε equally
sized intervals Sj,1 , Sj,2 , . . . , Sj,1/ε of lengths εc0j . Let Rj,l 0
be the set of items
intersecting the interval Sj,l . As each packed item can belong to at most two
such intervals, the cheapest set R00 among {Rj,1 0 0
, . . . , Rj,1/ε } has profit at most
2εp(Rj ). Thus we can remove this set R and reduce the bin size by a factor
0 00
of (1 − ε).
Now consider the packing of the k bins in the optimal packing OP T . Let
Rj be the set of items packed in bin j.
The algorithm first guesses all Xj ’s, a constant number of items, in all k
bins. We assign them to corresponding bins, implying a O(nk/ε ) factor in
2
the running time. Then for bin j we are left with capacity c0j . From the
previous discussion, we know that there is packing of Rj00 ⊆ Rj \ Xj of profit
(1 − 2ε)p(Rj \ Xj ) in a bin with capacity (1 − ε)c0j . Thus we can use the
algorithm for GAP with resource augmentation provided by Lemma 6 to pack
the remaining items in k bins where for bin j we use the original capacity
to be (1 − ε)c0j for j ∈ [k]; note that (1 − ε)(1 + ε) ≤ 1, so the solution is
feasible with the capacities c0j . As Lemma 6 returns the optimal packing on this
modified bin sizes, we obtain a total profit of at least (1 − 2ε)(1 − ε)p(OP T ) ≥
(1 − 3ε)p(OP T ). The running time is the same as in Lemma 6 multiplied by
the O(nk/ε ) factor for the initial item guessing and assignment.
2
Figure 2.2. From left to right: a box, which is a rectangular region with
arbitrary rectangles packed inside; a vertical container, which is a box where
rectangles are piled from left to right; an area container, where width and
height of the rectangles inside is much smaller than the width and height of
the container, making it easy to pack them by NFDH.
• A vertical container is a box such that any vertical line overlaps at most
one rectangle packed in it.
• An ε-granular area container is a box, say of size w × h, such that all the
rectangles that are packed inside have width at most εw and height at
most εh. We will simply talk about an area container when the value of
ε is clear from the context.
A packing such that all the packed rectangles are contained in a container
and all the area containers are ε-granular is called and ε-granular container
packing; again, we will simply call it a container packing when the choice of ε
is clear from the context.
Observe that for a horizontal or a vertical container, once a set of rectangles
that can feasibly be packed is assigned, constructing a packing is trivial. More-
over, the next lemma shows that it is easy to pack almost all the rectangles
assigned to an area container:
Proof. If a(R) ≤ (1 − 2ε)a(C), then NFDH can pack all the rectangles by
Lemma 1. Suppose that a(R) > (1 − 2ε)a(C). Consider the elements of R by
non-increasing order of profit over area ratio. Let R0 be the maximal subset of
26 2.4 Container packings
In the remaining part of this section, we show that container packings are
easy to approximate if the number of containers is bounded by some fixed
constant.
Lemma 10. Let ε > 0, and let R be a set of rectangles packed in a horizontal
or vertical container C. Then, for any k ≥ 1/ε, there is a set R0 ⊆ R with
profit p(R0 ) ≥ (1 − ε)p(R) that can be packed in a container C 0 smaller than
C such that w(C 0 ) ∈ W IDT HS(R)(k) and h(C 0 ) ∈ HEIGHT S(R)(k) .
Proof. Without loss of generality, we prove the thesis for an horizontal con-
tainer C; the proof for vertical containers is symmetric. Clearly, the width of C
can be reduced to wmax (R), and wmax (R) ∈ W IDT HS(R) ⊆ W IDT HS(R)(k) .
If |R| ≤ 1/ε, then (k)
and there is no need
P
Ri ∈R hi ∈ HEIGHT S(R)
to round the height of C down. Otherwise, let RT ALL be the set of the 1/ε
rectangles in R with largest height (breaking ties arbitrarily), let Rj be the least
profitable of them, and let R0 = R \ {Rj }. Clearly, p(R0 ) ≥ (1 − ε)p(R). Since
each element of R0 \RT ALL has height at most hj , it follows that h(R\RT ALL ) ≤
(n−1/ε)hj . Thus, letting i = dh(R0 \ RT ALL )/hj e ≤ n, all the rectangles in R0
fit in a container C 0 of width wmax (R) and height h(C 0 ) := h(RT ALL ) + ihj ∈
27 2.4 Container packings
HEIGHT S(R)(k) . Since h(RT ALL ) + ihj ≤ h(RT ALL ) + h(R0 \ RT ALL ) + hj =
h(R) ≤ h(C), this proves the result.
Lemma 11. Let ε > 0, and let R be a set of rectangles that are assigned to
an area container C. Then there exists a subset R0 ⊆ R with profit p(R0 ) ≥
(1 − 3ε)p(R) and a container C 0 smaller than C such that: a(R0 ) ≤ a(C),
w(C 0 ) ∈ W IDT HS(R)(0) , h(C 0 ) ∈ HEIGHT S(R)(0) , and each Rj ∈ R0 is
ε
-small for C 0 .
1−ε
Proof. Without loss of generality, we can assume that w(C) ≤ nwmax (R) and
h(C) ≤ nhmax (R): if not, we can first shrink C so that these conditions are
satisfied, and all the rectangles still fit in C.
Define a container C 0 that has width w(C 0 ) = wmax (R) bw(C)/wmax (R)c
and height h(C 0 ) = hmax (R) bh(C)/hmax (R)c, that is, C 0 is obtained by shrink-
ing C to the closest integer multiples of wmax (R) and hmax (R). Observe that
w(C 0 ) ∈ W IDT HS(R)(0) and h(C 0 ) ∈ HEIGHT S(R)(0) . Clearly, w(C 0 ) ≥
w(C) − wmax (R) ≥ w(C) − εw(C) = (1 − ε)w(C), and similarly h(C 0 ) ≥
(1 − ε)h(C 0 ). Hence a(C 0 ) ≥ (1 − ε)2 a(C) ≥ (1 − 2ε)a(C).
We now select a set R0 ⊆ R by greedily choosing elements from R in
non-increasing order of profit/area ratio, adding as many elements as possible
without exceeding a total area of (1−2ε)a(C). Since each element of R has area
at most ε2 a(C), then either all elements are selected (and then p(R0 ) = p(R)),
or the total area of the selected elements is at least (1 − 2ε − ε2 )a(C) ≥
(1 − 3ε)a(C). By the greedy choice, we have that p(R0 ) ≥ (1 − 3ε)p(R).
Since each rectangle in R is 1−εε
-small for C 0 , this proves the thesis.
Remark. Note that in the above, the size of the container is rounded to a family
of sizes that depends on the rectangles inside; of course, they are not known
in advance in an algorithm that enumerates over all the container packings.
On the other hand, if the instance is a set I of n rectangles, then for any
fixed natural number k we have that W IDT HS(R)(k) ⊆ W IDT HS(I)(k) and
HEIGHT S(R)(k) ⊆ W IDT HS(I)(k) for any R ⊆ I; clearly, the resulting set
of possible widths and heights has a polynomial size and can be computed from
the input.
Similarly, when finding container packings for the case with rotations, one
can compute the set SIZES(I) := W IDT HS(I) ∪ HEIGHT S(I), and con-
sider containers of width and height in SIZES(I)(k) for a sufficiently high
constant k.
28 2.4 Container packings
Theorem 12. Let ε > 0, and let OP Tc be the optimal ε-granular container
packing for a 2DGK instance into some fixed number K = Oε (1) of containers.
Then there exists a polynomial time algorithm that outputs a packing AP Xc
such that p(AP Xc ) ≥ (1 − O(ε))p(OP Tc ). The algorithm works in both the
cases with or without 90◦ rotations.
Proof. Let OP Tc0 be the rounded container packing obtained from OP Tc after
rounding each container as explained in Lemmas 10 and 11; clearly, p(OP Tc0 ) ≥
(1 − O(ε))p(OP Tc ). Moreover, the sizes of all the containers in OP Tc0 and a
feasible packing for them can be guessed in polynomial time.
Consider first the case without rotations. We construct the following in-
stance of GAP (see Section 2.3 for the notation), where we define a bin for
each container of OP Tc0 .
For each horizontal (resp., vertical) container Cj of size a × b, we define one
bin j with capacity cj equal to b (resp., a). For each area container Cj of size
a × b, we define one bin j with capacity cj equal to a · b. For each rectangle Ri
we define one element i, with profit pi . We next describe a size si,j for every
element-bin pair (i, j). If bin j corresponds to a horizontal (resp., vertical)
container Cj of capacity cj , then si,j = hi (resp., si,j = wi ) if wi ≤ a (resp.,
hi ≤ b) and si,j = +∞ otherwise. Instead, if j corresponds to an area container
of size a × b, then we set si,j = hi · wi if wi ≤ εa and hi ≤ εb, and si,j = +∞
otherwise.
By using the algorithm of Lemma 8, we can compute a (1−3ε)-approximate
solution for the GAP instance. This immediately induces a feasible packing
for horizontal and vertical containers. For each area container, we pack the
rectangles by using Lemma 9, where we lose another 3ε-fraction. Overall, we
obtain a solution with profit at least (1 − 3ε)2 p(OP Tc0 ) ≥ (1 − O(ε))p(OP Tc ).
In the case with rotations we use the same approach, but defining the GAP
instance in a slightly different way. For a horizontal containers Cj of size a × b,
we consider the same si,j as before and update it to wi if hi ≤ a, and wi < si,j .
In the latter case, if element i is packed into bin j, then the rectangle Ri is
packed rotated inside the container Cj . For vertical containers we perform a
symmetric assignment.
For an area container Cj of size a × b, if according to the above assignment
one has si,j = +∞, then we update si,j to wi · hi if wi ≤ εb and hi ≤ εa. In
29 2.5 Packing Rectangles with Resource Augmentation
the latter case, if element i is packed into bin j, then item i is packed rotated
inside Cj .
If we are allowed pseudo-polynomial time (or if all widths and heights are
polynomially bounded), we can obtain the following result, that is useful when
we want to pack all the given rectangles, but we are allowed to use a slightly
larger target region.
Theorem 13. Let ε > 0, and let I be a set of rectangles that admits a ε-
granular container packing with K = Oε (1) containers into a a × b knapsack.
Then there exists a PPT algorithm that packs all the rectangles in I into a
(1 + 2ε)a × b (resp. a × (1 + 2ε)b) knapsack. The algorithm works in both the
cases with or without 90◦ rotations.
Proof. We prove the result only for the a × (1 + 2ε)b target knapsack, the other
case being symmetric.
Since we are allowed pseudo-polynomial time, we can guess exactly all the
containers and their packing in the a × b knapsack. Then, we build the GAP
instance as in the proof of Theorem 12. This time, in pseudo-polynomial time,
we can solve it exactly by Lemma 5, that is, we can find an assignment of all
the rectangles into the containers.
We now enlarge the height of each area container by a factor 1+2ε, that is, if
the container C has size w(C)×h(C), we enlarge its size to w(C)×(1+2ε)h(C);
clearly, it is still possible to pack all the containers in the enlarged a × (1 + 2ε)b
knapsack. The proof is concluded by observing that all the rectangles that are
assigned to C can be packed in the enlarged container by Lemma 1.
area of the rectangles in the obtained packing; moreover, by using our frame-
work of packing in containers, we obtain a substantially simpler algorithm. For
the sake of completeness, we provide a full proof, which follows in spirit the
proof of the original result. We will prove the following:
Lemma 14 (Resource Augmentation Packing Lemma). Let I 0 be a collection
of rectangles that can be packed into a box of size a × b, and εra > 0 be a given
constant. Then there exists an εra -granular container packing of I 00 ⊆ I 0 inside
a box of size a × (1 + εra )b (resp., (1 + εra )a × b) such that:
1. p(I 00 ) ≥ (1 − O(εra ))p(I 0 );
2. the number of containers is Oεra (1) and their sizes belong to a set of
cardinality nOεra (1) that can be computed in polynomial time;
3. the total area of the containers is at most a(I 0 ) + εra ab.
Note that in this result we do not allow rotations, that is, rectangles are
packed with the same orientation as in the original packing. However, as an
existential result we can apply it also to the case with rotations. Moreover,
since Theorem 12 gives a PTAS for approximating container packings, this
implies a simple algorithm that does not need to solve any LP to find the
solution, in both the cases with and without rotations.
For simplicity, in this section we assume that widths and heights are positive
real numbers in (0, 1], and a = b = 1: in fact, all elements, container and boxes
can be rescaled without affecting the property of a packing of being a container
packing with the above conditions. Thus, without loss of generality, we prove
the statement for the augmented 1 × (1 + εra ) box.
We will use the following Lemma, that follows from the analysis in Kenyon
and Rémila [2000]:
Lemma 15 (Kenyon and Rémila [2000]). Let ε > 0, and let Q be a set of
rectangles, each of height and width at most 1. Let L ⊆ Q be the set of rect-
angles of width at least ε, and let OP TSP (L) be the minimum width such that
the rectangles in L can be packed in a box of size OP TSP (L) × 1.
Then Q can be packed in polynomial time into a box of height 1 and width
w̃ ≤ max{OP TSP (L) + 18 w , a(Q)(1 + ε) + 19
ε2 max
w }, where wmax is the max-
ε2 max
imum width of rectangles in Q. Furthermore, all the rectangles with both width
and height less than ε are packed into at most ε92 boxes, and all the remaining
rectangles into at most 27
ε3
vertical containers.
Note that the boxes containing the rectangles that are smaller than ε are
not necessarily packed as containers.
31 2.5 Packing Rectangles with Resource Augmentation
Lemma 16. Let ε > 0 and let f (·) be any positive increasing function such
that f (x) < x for all x. Then, there exist positive constant values δ, µ ∈ Ωε (1),
with δ ≤ f (ε) and µ ≤ f (δ) such that the total profit of all the rectangles whose
width or height lies in (µ, δ] is at most ε · p(I 0 ).
We use this lemma with ε = εra , and we will specify the function f later.
By properly choosing the function f , in fact, we can enforce constraints on the
value of µ with respect to δ, which will be useful several times; the exact con-
straints will be clear from the analysis. Thus, we remove from I 0 the rectangles
that have at least one side length in (µ, δ].
We call a rectangle Ri wide if wi > δ, high if hi > δ, short if wi ≤ µ
and narrow if hi ≤ µ.1 From now on, we will assume that we start with the
optimal packing of the rectangles in R0 , and we will modify it until we obtain
a packing with the desired properties. We remove from R0 all the short-narrow
rectangles, initially obtaining a packing. We will show in section 2.5.5 how to
use the residual space to pack them, with a negligible loss of profit.
As a first step, we round up the widths of all the wide rectangles in R0 to
the nearest multiple of δ 2 ; moreover, we shift them horizontally so that their
starting coordinate is an integer multiple of δ 2 (note that, in this process, we
might have to shift also the other rectangles in order to make space). Since
the width of each wide rectangle is at least δ and 1δ · 2δ 2 = 2δ, it is easy to see
that it is sufficient to increase the width of the box to 1 + 2δ to perform such
a rounding.
any wide rectangle; we define a box for each such region that contains at least
one short-high rectangle, and we denote the set of such boxes by B.
Note that some short rectangles might intersect the vertical edges of the
boxes, but in this case they overlap with exactly two boxes. Using a standard
shifting technique, we can assume that no rectangle is cut by the boxes by
losing profit at most εra OP T : first, we assume that the rectangles intersecting
two boxes belong to the leftmost of those boxes. For each box B ∈ B (which
has width δ 2 by definition), we divide it into vertical strips of width µ. Since
2
there are δµ > 2/εra strips and each rectangle overlaps with at most 2 such
strips, there must exist one of them such that the profit of the rectangles
intersecting it is at most 2µp(B) ≤ εra p(B), where p(B) is the profit of all
the rectangles that are contained in or belong to B. We can remove all the
rectangles overlapping such strip, creating in B an empty vertical gap of width
µ, and then we can move all the rectangles intersecting the right boundary of
B to the empty space, as depicted in Figure 2.4.
Figure 2.4. For each vertical box, we can remove a low profit subset of rectan-
gles (red in the picture), to make space for short-high rectangles that cross the
right edge of the box (blue).
• each box B ∈ B storing at least one short-high rectangle has width δ 2 , and
the rectangles inside are packed into at most 1/δ 7 vertical containers.
rectangles with right and left coordinates that are multiples of δ 2 . We will
now show that we can derive a fractional packing with the same profit, and
such that the rectangles and pseudoitems can be (fractionally) assigned to a
constant number of containers. By fractional packing we mean a packing where
horizontal rectangles are allowed to be sliced horizontally (but not vertically);
we can think of the profit as being split proportionally to the heights of the
slices.
Let K be a subset of the horizontal rectangles of size K that will be specified
later. By extending horizontally the top and bottom edges of the rectangles in
K and the pseudoitems in B, we partition the knapsack into at most 2(|K| +
|B|) + 1 ≤ 2(K + δ23 ) + 1 ≤ 2(K + δ33 ) horizontal stripes.
Let us focus on the (possibly sliced) rectangles contained in one such stripe
of height h. For any vertical coordinate y ∈ [0, h] we can define the configura-
tion at coordinate y as the set of positions where the horizontal line at distance
y from the bottom cuts a vertical edge of a horizontal rectangle which is not
in K. There are at most 2M −1 possible configurations in a stripe.
We can further partition the stripe in maximal contiguous regions with the
same configuration. Note that the number of such regions is not bounded,
since configurations can be repeated. But since the rectangles are allowed to
be sliced, we can rearrange the regions so that all the ones with the same con-
figuration appear next to each other; see Figure 2.5 for an example. After this
step is completed, we define up to M horizontal containers per each config-
uration, where we repack the sliced horizontal rectangles. Clearly, all sliced
rectangles are repacked.
Thus, the number of horizontal containers that we defined per each stripe
35 2.5 Packing Rectangles with Resource Augmentation
of smaller containers, so that the total area of the new containers is at most as
big as the total area of the rectangles originally packed in the container. Note
that in each container we consider the rectangles with the original widths (not
rounded up). We use the following lemma:
Lemma 19. Let C be a horizontal (resp. vertical) container defined above, and
let RC be the set of rectangles packed in C. Then, it is possible
to pack a set
RC ⊆ RC of profit at least (1−3εra )p(RC ) in a set of at most log1+εra ( δ ) /ε2ra
0 1
horizontal (resp. vertical) containers that can be packed inside C and such that
their total area is at most a(RC ).
Proof. Without loss of generality, we prove the result only for the case of a
horizontal container.
Since wi ≥ δ for each rectangle
Ri ∈ RC , we can partition the rectangles
in RC into at most log1+εra ( δ ) groups R1 , R2 , . . . , so that in each Rj the
1
widest rectangle has width bigger than the smallest by a factor at most 1 + εra ;
we can then define a container Cj for each group Rj that has the width of the
widest rectangle it contains and height equal to the sum of the heights of the
contained rectangles.
Consider now one such Cj and the set of rectangles Rj that it contains,
and let P := p(Rj ). Clearly, w(Cj ) ≤ (1 + εra )wi for each Ri ∈ Rj , and
so a(Cj ) ≤ (1 + εra )a(Rj ). If all the rectangles in Rj have height at most
εra h(Cj ), then we can remove a set of rectangles with total height at least
εra h(C) and profit at most 2εra p(Rj ). Otherwise, let Q be the set of rectangles
of height larger than εra h(Cj ), and note that a(Q) ≥ εra h(Cj )w(Cj )/(1 + εra ).
If p(Q) ≤ εra P , then we remove the rectangles in Q from the container Cj and
reduce its height as much as possible, obtaining a smaller container Cj0 ; since
a(Cj0 ) ≤ a(Cj ) − εra a(Cj ) = (1 − εra )a(Cj ) ≤ (1 − εra )(1 + εra )a(Rj ) < a(Rj ),
then the proof is finished. Otherwise, we define one container for each of the
rectangles in Q (which are at most 1/εra ) of exactly the same size, and we
still shrink the container with the remaining rectangles as before; note that
there is no lost area for each of the newly defined container. Since at every
non-terminating iteration a set of rectangles with profit larger than εra P is
removed, the process must end within 1/εra iterations.
Note that the total number of containers that we produce for each initial
container Cj is at most 1/ε2ra , and this concludes the proof.
Thus, by applying the above lemma to each horizontal and each vertical
container, we obtain a modified packing where the total area of the horizontal
and vertical containers is at most the area of the rectangles of R0 (without the
37 2.5 Packing Rectangles with Resource Augmentation
short-narrow rectangles, which we will take into account in the next section),
while the number of containers increases at most by a factor log1+εra ( 1δ ) /ε2ra .
create a non-uniform grid extending each side of the containers until they
hit another container or the boundary of the knapsack. Moreover, we also
add horizontal and vertical lines spaced at distance εra . We call free cell
each face defined by the above lines that does not overlap a container of
the packing; by construction, no free cell has a side bigger than εra . The
number of free cells in this grid plus the existing containers is bounded by
KT OT AL = (2K 0 + 1/εra )2 = Oεra ,δ (1). We crucially use the fact that this
number does not depend on the value of µ.
Note that the total area of the free cells is no less than the total area of
the short-narrow rectangles, as a consequence of the guarantees on the area of
the containers introduced so far. We will pack the short-narrow rectangles into
the free cells of this grid using NFDH, but we only use cells that have width
and height at least ε8µra
; thus, each short-narrow rectangle will be assigned to
a cell whose width (resp. height) is larger by at least a factor 8/εra than the
width (resp. height) of the rectangle. Each discarded cell has area at most
8µ
εra
, which implies that the total area of discarded cells is at most 8µKεTraOT AL .
Now we consider the selected cells in an arbitrary order and pack short narrow
rectangles into them using NFDH, defining a new area container for each cell
that is used. Thanks to Lemma 1, we know that each new container C (except
maybe the last one) that is used by NFDH contains rectangles for a total area
of at least (1 − εra /4)a(C). Thus, if all rectangles are packed, we remove the
last container opened by NFDH, and we call S the set of rectangles inside, that
we will repack elsewhere; note that a(S) ≤ ε2ra ≤ εra /3, since all the rectangles
in S were packed in a free cell. Instead, if not all rectangles are packed by
NFDH, let S be the residual rectangles. In this case, the area of the unpacked
2
rectangles is a(S) ≤ 8µKεTraOT AL + εra /4 ≤ εra /3, assuming that µ ≤ 96KεTraOT AL
.
In order to repack the rectangles of S, we define a new area container
CS of height 1 and width εra /2. Since a(CS ) = εra /2 ≥ (εra /3)/(1 − 2εra ), all
elements from S are packed in CS by NFDH, and the container can be added to
the knapsack by further enlarging its width from 1+2δ to 1+2δ+εra /2 < 1+εra .
The last required step is to guarantee the necessary constraint on the total
area of the area containers, similarly to what was done in Section 2.5.4 for the
38 2.5 Packing Rectangles with Resource Augmentation
width w(D) and height (1 − εra )h(D). It is easy to verify that each rectangle
in RD has width (resp. height) at most εra w(D0 ) (resp. εra h(D0 )). Moreover,
since a(RD 0
) ≤ (1 − 3εra )a(D) ≤ (1 − 2εra )(1 − εra )a(C) ≤ (1 − 2εra )a(C 0 ), then
all elements in RD 0
are packed in D0 . By applying this reasoning to each area
container (except CS ), we obtain property (3) of Lemma 14.
10
Note that the constraints on µ and δ that we imposed are µ ≤ δ76 (from
2
Section 2.5.1), and µ ≤ 96KεTra OT AL
. It is easy to check that both of them are
satisfied if we choose f (x) = (εra x)C for a big enough constant C that depends
only on εra . This concludes the proof.
Chapter 3
39
40
O(ε) · W 0.5 · W
2(1 + ε − 2α) · OP T 0
Bdisc,top
γ·W (1 − γ) · W
BV,round
BM,ver
BV,cut
α · OP T 0
Bdisc,bot Bdisc
BV,round
BM,ver
BV,cut
α · OP T 0 (1 + ε − 2α) · OP T 0
BS
BH,cut BS
O(ε) · OP T 0 BH,round BH,cut
O(ε) · OP T 0 BH,round
BM,hor
OP T 0 BM,hor
OP T OP T 0
OP T
0 0
0 W 0 W
(a) Final packing obtained by (b) Final packing obtained in this work.
Nadiradze and Wiese [2016]. Here γ is a small constant depending on ε.
horizontal region of size w × (1 + ε − 2α)h, and they nicely rearrange the re-
maining rectangles into a constant number of sub-boxes (excluding possibly a
few more non-tall rectangles, that can be placed in the additional vertical box).
These discarded rectangles can be packed into 2 extra boxes of size w2 ×
(1 + ε − 2α)h (see Figure 3.4d). In turn, the latter boxes can be packed into
two discarded boxes of size W2 × (1 + ε − 2α)OP T 0 , that we can imagine as
placed, one on top of the other, on the top-right of the packing. See Figure
3.1a for an illustration of the final packing. This leads to a total height of
(1 + max{α, 2(1 − 2α)} + O(ε)) · OP T , which is minimized by choosing α = 52 .
Our main technical contribution is a repacking lemma that allows one to
repack a small fraction of the discarded rectangles of a given box inside the
free space left by the corresponding sub-boxes (while still having Oε (1) many
sub-boxes in total). This is illustrated in Figure 3.4e. This way we can pack
all the discarded rectangles into a single discarded box of size (1 − γ)W × (1 +
ε − 2α)OP T 0 , where γ is a small constant depending on ε, that we can place
on the top-right of the packing. The vertical box where the remaining rectan-
41 3.1 Preliminaries and notations
gles are packed still fits to the top-left of the packing, next to the discarded
box. See Figure 3.1b for an illustration. Choosing α = 1/3 gives the claimed
approximation factor.
We remark that the basic approach by Nadiradze and Wiese strictly requires
that at most 2 tall rectangles can be packed one on top of the other in the
optimal packing, hence imposing α ≥ 1/3. Thus in some sense we pushed their
approach to its limit.
The algorithm by Nadiradze and Wiese [2016] is not directly applicable
to the case when 90◦ rotations are allowed. In particular, they use a linear
program to pack some rectangles. When rotations are allowed, it is unclear
how to decide which rectangles are packed by the linear program. We use a
combinatorial container -based approach to circumvent this limitation, which
allows us to pack all the rectangles using dynamic programming. In this way
we obtain a PPT (4/3 + ε)-approximation for strip packing with rotations,
breaking the polynomial-time approximation barrier of 3/2 for that variant as
well.
and hmax (M) (resp. wmax (M)) denotes the maximum height (resp. width) of
rectangles in M. Throughout this work, a box of size a × b means an axis-
aligned rectangular region of width a and height b.
• Large if hi ≥ δh OP T and wi ≥ δw W .
OP T
αOP T
Vertical Medium Large
δh OP T
µh OP T
0
0 µw W δw W W
• Horizontal if hi ≤ µh OP T and wi ≥ δw W ,
• Small if hi ≤ µh OP T and wi ≤ µw W ;
exists a value j such that the total area of the elements in Wj ∪ Hj is at most
2OP T · W
= εk · OP T · W . Choosing δh = yj , µh = yj+1 , δw = xj , µw = xj+1
T
verifies all the conditions of the lemma.
The function f and the constant k will be chosen later. From now on,
assume that δh , δw , µh and µw are chosen according to Lemma 20.
Figure 3.3. A box and some overlapping rectangles. Dark gray rectangles are
nicely cut by the box; hatched rectangles are cut but not nicely cut by the box,
and light gray rectangle is not cut by the box.
• each box has size equal to the size of some Ri ∈ L ( large box), or has
height at most δh OP T 0 ( horizontal box), or has width at most δw W
( vertical box);
Proof. We apply Lemma 6 in Nadiradze and Wiese [2016], where we set the
parameter δ to δw . Recall that δw < δh ; by requiring that µh < δw , and since
rectangles with height in [δw , δh ) are in M , we have that {Ri ∈ R \ M : wi ≥
δh W and hi ≥ δh OP T } = {Ri ∈ R \ M : wi ≥ δw W and hi ≥ δh OP T }.
Let Hcut ⊆ H be the set of horizontal rectangles that are nicely cut by a
box. Since rectangles in Hcut satisfy wi ≥ δw W , at most δ2w of them are nicely
cut by a box, and there are at most KB boxes. Hence, their total area is at
most µh OP Tδ·W
w
·2KB
, which is at most 2ε · OP T · W , provided that µh ≤ ε · KδwB .
Since Lemma 6 in Nadiradze and Wiese [2016] implies that the area of the cut
46 3.1 Preliminaries and notations
horizontal rectangles that are not nicely cut is at most εOP T 0 · W , the total
area of horizontal cut rectangles is at most 3εOP T 0 · W .
3. all the rectangles in Tcut ∪ Tbox ∪ Vbox are packed as in Lemma 23;
4. all the rectangles in Vcut are packed in an additional vertical box BV,cut of
size ( γ3 W ) × (αOP T ).
Proof. Note that there are at most 1/(δw δh ) rectangles in L and at most 4KB
rectangles in Tcut , since the left (resp. right) side of each box can nicely cut at
most 2 tall rectangles; this is enough to prove points (1) and (3).
Thanks to Lemma 23, the total area of horizontal cut rectangles is at most
O(εOP T 0 · W ). By Lemma 1, we can remove them from the packing and pack
them in the additional box BH,cut using NFDH algorithm, proving point (2).
Each box of the partition can nicely cut at most 2(1+ε) δh
rectangles in V ;
thus, the cut vertical rectangles are at most 2KBδ(1+ε)
h
. Since the width of each
vertical rectangle is at most µw W , they can be removed from the packing and
placed in BV,cut , piled side by side, as long as 2KBδ(1+ε)
h
· µw W ≤ γ3 W , which is
equivalent to µw ≤ 6KBγδ(1+ε)
h
. This proves point (4).
packed inside D. For each corner Q of the box B, we consider the maximal
rectangular region that has Q as a corner and only contains pseudo rectangles
whose top/bottom side overlaps with the bottom/top side of a rectangle in T cut ;
there are at most 4 such non-empty regions, and for each of them we define a
corner sub-box, and we call the set of such sub-boxes B corn (see Figure 3.4c).
The final step of the algorithm is to rearrange horizontally the pseudo/tall rect-
angles so that pseudo/tall rectangles of the same height are grouped together
as much as possible (modulo some technical details). The rectangles in B corn
are not moved. The sub-boxes are induced by maximal consecutive subsets of
pseudo/tall rectangles of the same height touching the top (resp., bottom) side
of B (see Figure 3.4d). We crucially remark that, by construction, the height
of each sub-box (and of B) is a multiple of γOP T .
By splitting each discarded box D into two halves B disc,top and B disc,bot ,
and replicating the packing of boxes inside BOP T 0 , it is possible to pack all the
discarded boxes into two boxes Bdisc,top and Bdisc,bot , both of size W2 × (1 + ε −
2α)OP T 0 .
A feasible packing of boxes (and hence of the associated rectangles) of
height (1 + max{α, 2(1 − 2α)} + O(ε))OP T is then obtained as follows. We
first pack BOP T 0 at the base of the strip, and then on top of it we pack BM,hor ,
two additional boxes BH,round and BH,cut (which will be used to repack the
horizontal items), and a box BS (which will be used to pack some of the small
items). The latter 4 boxes all have width W and height O(εOP T 0 ). On the
top right of this packing we place Bdisc,top and Bdisc,bot , one on top of the other.
Finally, we pack BM,ver , BV,cut and BV,round on the top left, one next to the
other. See Figure 3.1a for an illustration. The height is minimized for α = 52 ,
leading to a 7/5 + O(ε) approximation.
The main technical contribution of our result is to show how it is possible to
repack a subset of V disc into the free space inside B cut := B −T cut not occupied
by sub-boxes, so that the residual sliced rectangles can be packed into a single
discarded box B disc of size (1 − γ)w × (1 + ε − 2α)h (repacking lemma). See
Figure 3.4e. This apparently minor saving is indeed crucial: with the same
approach as above all the discarded sub-boxes B disc can be packed into a single
discarded box Bdisc of size (1 − γ)W × (1 + ε − 2α)OP T 0 . Therefore, we can
pack all the previous boxes as before, and Bdisc on the top right. Indeed, the
total width of BM,ver , BV,cut and BV,round is at most γW for a proper choice of
the parameters. See Figure 3.1b for an illustration. Altogether the resulting
packing has height (1 + max{α, 1 − 2α} + O(ε))OP T . This is minimized for
α = 13 , leading to the claimed 4/3 + O(ε) approximation.
It remains to prove our repacking lemma.
49 3.2 A repacking lemma
α
(1 − 1+ )h
α
1+ε h
B disc,top
(1 + ε − 2α)h(1 + ε − 2α)h
B disc
(1 + ε − 2α) h
B disc,bot
≤ (1 − γ)w
1
2w
≥ γw
good indexes
(d) Rearrangement of pseudo and tall (e) Our refined repacking of V disc
rectangles to get Oε (1) sub-boxes, and according to Lemma 25: some vertical
additional packing of V disc as in slices are repacked in the free space.
Nadiradze and Wiese [2016].
Proof. Let f (i) denote the height of the i-th free rectangle, where for nota-
tional convenience we introduce a degenerate free rectangle of height f (i) = 0
whenever the stripe [i−1, i]×[0, h] inside B does not contain any free rectangle.
This way we have precisely w free rectangles. We remark that free rectangles
are defined before the horizontal rearrangement of tall/pseudo rectangles, and
the consequent definition of sub-boxes.
Recall that sub-boxes contain tall and pseudo rectangles. Now consider the
area in B cut not occupied by sub-boxes. Note that this area is contained in
the central region of height h(1 − 1+ε
2α
). Partition this area into maximal-height
unit-width vertical stripes as before (newly free rectangles). Let g(i) be the
height of the i-th newly free rectangle, where again we let g(i) = 0 if the stripe
[i−1, i]×[0, h] does not contain any (positive area) free region. Note that, since
tall and pseudo rectangles are only shifted horizontally in the rearrangement,
it must be the case that:
Xw Xw
f (i) = g(i).
i=1 i=1
γh γh
≥ · |G| = · (w − |G|)
1+ε 1+ε
Proof. Without loss of generality, we only prove the lemma for the case of
vertical rectangles. Consider each slice of width 1 of B. In each slice, sort the
rectangles by decreasing height, and move them down so that the bottom of
each rectangles is touching either the bottom of the box, or the top of another
52 3.3 Proof of Lemma 26
rectangle. Call the type of a slice as the set of different heights of rectangles
that it contains. It is easy to see that there are at most (q + 1)d different types
of slices. Sort the slices so that all the slices of the same type appear next to
each other. It easy to see that all the rectangles in the slices of a fixed type can
be packed in at most d vertical containers, where each container has the same
height as the contained rectangles. By repeating this process for all the slices,
we obtain a repacking of all the rectangles in at most d(q + 1)d containers.
Lemma 28. Given a set {R1 , R2 , . . . , Rm } of horizontal (resp. vertical) rect-
angles and a set {C1 , C2 , . . . , Ct } of horizontal (resp. vertical) containers such
that the rectangles can be packed into the containers allowing horizontal (resp.
vertical) slicing of height (resp. width) one, then there is a feasible packing of
all but at most t rectangles into the same containers.
Proof. Let us prove the lemma only for the horizontal case (the vertical case
is analogous). Without loss of generality, assume that w(R1 ) ≥ w(R2 ) ≥ · · · ≥
w(Rm ) and also w(C1 ) ≥ · · · ≥ w(Ct ).
Start assigning the rectangles iteratively to the first container and stop as
soon as the total height of assigned rectangles becomes strictly larger than
h(C1 ). By discarding the last assigned rectangle, this gives a feasible packing
(without slicing) of all the other assigned rectangles in the first container. Then
we proceed similarly with the remaining rectangles and following containers.
Now we show that the above procedure outputs a feasible packing of all
but at most t rectangles (the discarded ones) into the containers. Due to
feasibility of the packing of the sliced rectangles into the containers, we already
have, m i=1 h(Ci ). Note that the non-empty containers (except
P Pt
i=1 h(Ri ) ≤
possibly the last one) are overfilled if we include the discarded rectangles. Thus,
the above process assigns all the rectangles.
To finish the proof, we need to show that if Rj is assigned to container Ck
by above procedure, then w(Rj ) ≤ w(Ck ). Now as containers C1 , . . . , Ck−1 are
overfilled including the so far discarded rectangles, we have that
j k−1
X X
h(Ri ) > h(Ci ) (3.1)
i=1 i=1
Now for the sake of contradiction, let us assume w(Rj ) > w(Ck ). Then
w(Rp ) > w(Cq ) for all p ≤ j and q ≥ k. Thus in every feasible packing,
even allowing slicing, rectangles R1 , . . . , Rj must be assigned to containers
C1 , . . . , Ck−1 . This contradicts (3.1).
Consider the packing obtained by applying Lemma 24. We will refine this
packing to obtain the additional structure claimed in Lemma 26.
53 3.3 Proof of Lemma 26
By putting back the slices of the original width, we obtain a packing of all
the slices of the rectangles in H1 , H2 , . . . , Ht . By Lemma 28, there exists a pack-
3/δw
ing of all the rectangles in H, except for a set of at most KH := KB εδ1w
horizontal containers. Provided that µh ≤ KεH , those remaining rectangles can
be piled in BH,round , together with rectangles in Hlong , by defining its height as
4εOP T .
• in one of two boxes BV,cut and BV,round , each of size γ3 W × αOP T , which
are in fact containers.
Moreover, the area of the vertical containers packed in BOP T 0 is at most a(T ∪
V ).
Consider a specific vertical box B of size w × h; as described in Section 3.2,
up to four sub-boxes B corn are defined, each one of them only containing slices
of rectangles in V . Then, the rectangles are repacked so that each rectangle
in T touches either the top or the bottom edge of B, and the set P of pseudo
rectangles is defined. Let B rem := B − T cut . We now get a rearrangement of
this packing applying the following lemma from Nadiradze and Wiese [2016]:
Lemma 31 (follows from the proof of Lemma 10 in Nadiradze and Wiese
[2016]). There is packing of T ∪ P ∪ B corn into at most KR := 2 1+ε
γ
· 6(1+ε)/γ
sub-boxes inside B rem , such that:
• each sub-box contains only tall rectangles or only pseudo rectangles, that
are all of the same height as the sub-box
55 3.3 Proof of Lemma 26
• the sub-boxes in B corn and the rectangle slices inside them are packed in
the same position as before.
Consider the packing obtained by the above lemma; partition all the free
space in B rem which is not occupied by the above defined boxes into at most
2KR + 1 empty sub-boxes by considering the maximal rectangular regions that
are not intersected by the vertical lines passing through the edges of the sub-
boxes. By Lemma 25, the fraction of the rectangles contained in slices of D of
total width at least γw can be repacked inside the empty sub-boxes.
Among the at most 3KR + 1 sub-boxes that we defined, some only contain
tall rectangles, while the others contain pseudo rectangles. The ones that only
contain tall rectangles are in fact already containers. Note also that the box
BV,cut defined in the proof of Lemma 24 is indeed already a vertical container.
For each sub-box B 0 that contains pseudo rectangles, we now consider the sliced
vertical rectangles that are packed in it. By Lemma 27, there is a packing of
all the (sliced) rectangles in B 0 into at most δ1h (1 + 1/γ)1/δh containers, and
their total area is equal to the total area of the slices of the rectangles they
contain. There are also at most 4KB containers to pack the tall rectangles
that are nicely cut; each of them is packed in his original position in a vertical
container of exactly the same size. In total we defined at most κ := (3KR +
1) δ1h (1 + 1/γ)1/δh +4KB +1 containers (where the additional term 1 is added to
take BV,cut into account). We remark that all the tall rectangles are integrally
packed, while vertical rectangles are sliced and packed into a container with
only slices of vertical rectangles. The total area of all the vertical containers
packed in BOP T 0 is at most the sum of the total area of tall items and the
total area of the sliced vertical rectangles, i.e., at most a(T ∪ V ). Finally, by
Lemma 28, all but κ vertical rectangles can be packed in the containers. With
the condition that µw ≤ 3κ γ
, these remaining vertical rectangles can be packed
in a vertical container BV,round of size γW
3
× αOP T . This concludes the proof
of Lemma 30 with KV := κ + 1.
Proof. We first extend the sides of the containers inside [0, W ] × [0, OP T 0 ]
in order to define a grid. This procedure partitions the free space in [0, W ] ×
[0, OP T 0 ] into a constant number of rectangular regions (at most (2KF + 1)2 ≤
5KF2 many) whose total area is at least a(S) thanks to Lemma 26. Let Bsmall
be the set of such rectangular regions with width at least εµw W/ε and height
at least µh OP T /ε (notice that the total area of rectangular regions not in
Bsmall is at most 5KF2 µw µh · W · OP T /ε2 ). We treat each such region as an
ε-granular area container, and we use NFDH to pack a subset of S into the
regions in Bsmall . By standard properties of NFDH (see also Lemma 1), since
each region in Bsmall has size at most W × OP T 0 and each item in S has width
at most µw W and height at most µh OP T , the total area of the unpacked
rectangles from S can be bounded above by 2ε · 5KF2 µw µh · W · OP T 0 /ε2 =
57 3.5 Conclusions
The choice of f and k from Lemma 20 (and consequently the actual values of
µh , δw , and µw ) needs to satisfy all the constraints that arise from the analysis,
that is:
• µw = εµ h
12
and δw = εδ12h (Lemma 20), • µw ≤ γ 6KBδ(1+ε)
h
(Lemma 24),
• γ = εδ2h (Lemma 21), • µw ≤ 3KF (Lemma 26),
γ
It is not difficult to see that all the constraints are satisfied by choosing
for a large enough constant C and k = logε 36 . γ
C/(εx)
f (x) = (εx)
We proved that there exists a container packing with Oε (1) containers with
height at most ( 34 + O(ε))OP T . Finally, by using the algorithm provided by
Lemma 13, we obtain the main result of this chapter:
3.5 Conclusions
By refining the techniques of Nadiradze and Wiese [2016], we obtained a
Pseudo-Polynomial Time approximation algorithm for Strip Packing that has
an approximation ratio of 34 + O(ε); moreover, we argued that this is the best
possible result in this framework, and further improvements would require a
substantially different approach.
It is still a very interesting open problem to close the gap between the lower
bound of 5/4 provided by Henning et al. [2017] and the current upper bound
of 34 + O(ε) for the Pseudo-Polynomial Time approximability.
Similarly, there is still a gap for the polynomial time approximability of the
problem, with the recent upper bound of 5/3 + ε from Harren et al. [2014],
and the classical lower bound of 3/2. Closing this gap is a challenging open
problem whose solution is required to complete our understanding of the Strip
Packing problem.
58 3.5 Conclusions
Chapter 4
59
60
vertical or all horizontal items, and then pack the remaining items by a simple
reduction to one-dimensional knapsack (for which an FPTAS is known). It is
unclear whether a container-based packing can achieve a better approximation
factor, and we conjecture that this is not the case.
In order to obtain our results, we substantially deviate for the first time from
pure container-based packings. Instead, we consider L&C-packings that com-
bine Oε (1) containers plus one L-packing of the above type (see Figure 4.1.(a)),
and show that one such packing has large enough profit.
While it is easy to pack almost optimally items into containers, the men-
tioned 2 + ε approximation for L-packings is not sufficient to achieve alto-
gether a better than 2 approximation factor: indeed, the items of the L-packing
might carry all the profit! Our main algorithmic contribution is a PTAS for
the L-packing problem. It is easy to solve this problem optimally in pseudo-
polynomial time (N n)O(1) by means of dynamic programming. We show that
a 1 + ε approximation can be obtained by restricting the top (resp. right)
coordinates of horizontal (resp. vertical) items to a proper set that can be
computed in polynomial time nOε (1) . Given that, one can adapt the above
dynamic program to run in polynomial time.
Theorem 34. There is a PTAS for the L-packing problem.
In order to illustrate the power of our approach, we next sketch a simple 16
9
+
O(ε) approximation for the cardinality case of 2DGK (details in Section 4.2).
By standard arguments1 it is possible to discard large items with both sides
longer than ε · N . The remaining items have height or width smaller than ε · N
(horizontal and vertical items, resp.). Let us delete all items intersecting a
random vertical or horizontal strip of width ε · N inside the knapsack. We can
pack the remaining items into Oε (1) containers by Lemma 14 and Theorem 12.
A vertical strip deletes vertical items with O(ε) probability, and horizontal
ones with probability roughly proportional to their width, and symmetrically
for a horizontal strip. In particular, let us call long the items with longer side
larger than N/2, and short the remaining items. Then the above argument
gives in expectation roughly one half of the profit optlong of long items, and
three quarters of the profit optshort of short ones. This is already good enough
unless optlong is large compared to optshort .
At this point L-packings and our PTAS come into play. We shift long
items such that they form 4 stacks at the sides of the knapsack in a ring-
shaped region, see Figure 4.1.(b)–(c): this is possible since any vertical long
1
There can be at most Oε (1) such items in any feasible solution, and if the optimum
solution contains only Oε (1) items we can solve the problem optimally by brute force.
61
Figure 4.1. (a) An L&C-packing with 4 containers, where the top-left container
is packed by means of Next-Fit-Decreasing-Height. (b) A subset of long items.
(c) Such items are shifted into 4 stacks at the sides of the knapsack, and the
top stack is deleted. (d) The final packing into an L-shaped region.
item cannot have a horizontal long item both at its left and at its right, and
vice versa. Next we delete the least profitable of these stacks and rearrange
the remaining long items into an L-packing, see Figure 4.1.(d). Thus using
our PTAS for L-packings, we can compute a solution of profit roughly three
quarters of optlong . The reader might check that the combination of these two
algorithms gives the claimed approximation factor.
Above we used either Oε (1) containers or one L-packing: by combining the
two approaches together and with a more sophisticated case analysis we achieve
the following result (see Section 4.4).
For weighted 2DGK we face severe technical complications for proving that
there is a profitable L&C-packing. One key reason is that in the weighted case
we cannot discard large items since even one such item might contribute a large
fraction to the optimal profit.
In order to circumvent these difficulties, we exploit the corridor-partition
at the heart of the QPTAS for 2DGK in Adamaszek and Wiese [2015] (in turn
inspired by prior work in Adamaszek and Wiese [2013]). Roughly speaking,
there exists a partition of the knapsack into Oε (1) corridors, consisting of the
concatenation of Oε (1) (partially overlapping) rectangular regions (subcorri-
dors).
In Adamaszek and Wiese [2015] the authors partition the corridors into a
poly-logarithmic number of containers. Their main algorithm then guesses these
containers in time npoly log n . However, we can only handle a constant number
of containers in polynomial time. Therefore, we present a different way to
62 4.1 A PTAS for L-packings
partition the corridors into containers: here we lose the profit of a set of thin
items, which in some sense play the role of long items in the previous discussion.
These thin items fit in a very narrow ring at the boundary of the knapsack and
we map them to an L-packing in the same way as in the cardinality case above.
Some of the remaining non-thin items are then packed into Oε (1) containers
that are placed in the (large) part of the knapsack not occupied by the L-
packing. Our partition of the corridors is based on a somewhat intricate case
analysis that exploits the fact that long consecutive subcorridors are arranged
in the shape of rings or spirals: this is used to show the existence of a profitable
L&C-packing.
is packed inside the horizontal box [0, N ] × [0, hL ] and OP Tver := OP T ∩ Iver
is packed inside the vertical box [0, wL ] × [0, N ]. We remark that packing
horizontal and vertical items independently is not possible due to the possible
overlaps in the intersection of the two boxes: this is what makes this problem
non-trivial, in particular harder than standard (one-dimensional) knapsack.
Observe that in an optimal packing we can assume without loss of gener-
ality that items in OP Thor are pushed as far to the right/bottom as possible:
indeed pushing one such item to the right/bottom keeps the packing feasi-
ble. Furthermore, the items in OP Thor are packed from bottom to top in
non-increasing order of width. Indeed, it is possible to permute any two items
violating this property while keeping the packing feasible. A symmetric claim
holds for OP Tver . See Figure 4.1.(d) for an illustration.
Given the above structure, it is relatively easy to define a dynamic program
(DP) that computes an optimal L-packing in pseudo-polynomial time (N n)O(1) .
The basic idea is to scan items of Ihor (resp. Iver ) in decreasing order of width
(resp. height), and each time guess if they are part of the optimal solution
OP T . At each step either both the considered horizontal item i and vertical
63 4.1 A PTAS for L-packings
item j are not part of the optimal solution, or there exist a guillotine cut
separating i or j from the rest of OP T . Depending on the cases, one can
define a smaller L-packing sub-instance (among N 2 choices) for which the DP
table already contains a solution.
In order to achieve a (1 + ε)-approximation in polynomial time nOε (1) , we
show that it is possible (with a small loss in the profit) to restrict the pos-
sible top coordinates of OP Thor and right coordinates of OP Tver to proper
polynomial-size subsets T and R, resp. We call such an L-packing (T , R)-
restricted. By adapting the above DP one obtains:
• If j ≤ n(v), the value DP (i, t, j + 1, r). This covers the case that vj ∈
/
OP T ;0
• Assume that there exists t0 ∈ T such that t0 − h(hi ) ≥ t and that w(hi ) ≤
N − r. Then for the minimum such t0 we consider the value p(hi ) +
DP (i + 1, t0 , j, r). This covers the case that hi ∈ OP T 0 , and there exists
a (horizontal) guillotine cut separating hi from OP T 0 \ {hi }.
64 4.1 A PTAS for L-packings
and can be computed in polynomial time based on the input (without knowing
OP T ).
Lemmas 37 and 38, together immediately imply a PTAS for L-packings
(showing Theorem 34). The rest of this section is devoted to the proof of
Lemma 38.
We will describe a way to delete a subset of items Dhor ⊆ OP Thor with
p(Dhor ) ≤ 2εp(OP Thor ), and shift down the remaining items OP Thor \ Dhor
so that their top coordinate belongs to a set T with the desired properties.
Symmetrically, we will delete a subset of items Dver ⊆ OP Tver with p(Dver ) ≤
2εp(OP Tver ), and shift to the left the remaining items OP Tver \ Dver so that
their right coordinate belongs to a set R with the desired properties. We
remark that shifting down (resp. to the left) items of OP Thor (resp. OP Tver )
cannot create any overlap with items of OP Tver (resp. OP Thor ). This allows
us to reason on each such set separately.
We next focus on OP Thor only: the construction for OP Tver is symmetric.
For notational convenience we let 1, . . . , nhor be the items of OP Thor in non-
increasing order of width and from bottom to top in the starting optimal
packing. We remark that this sequence is not necessarily sorted (increasingly
or decreasingly) in terms of item heights: this makes our construction much
more complicated.
Let us first introduce some useful notation. Consider any subsequence
B = {bstart , . . . , bend } of consecutive items (interval ). For any i ∈ B, we
65 4.1 A PTAS for L-packings
define topB (i) := k∈B,k≤i h(k) and bottomB (i) = topB (i) − h(i). The grow-
P
Lemma 39. For any gi ∈ G and any j ∈ {bstart , . . . , gi+1 − 1}, h(j) ≤ h(gi ).
Proof. The items j ∈ BiG = {gi + 1, . . . , gi+1 − 1} have h(j) < h(gi ). Indeed,
any such j with h(j) ≥ h(gi ) would have been added to G, a contradiction.
Consider next any j ∈ {bstart , . . . gi − 1}. If j ∈ G the claim is trivially true
by construction of G. Otherwise, one has j ∈ BkG for some gk ∈ G, gk < gi .
Hence, by the previous argument and by construction of G, h(j) < h(gk ) ≤
h(gi ).
The intuition behind our construction is as follows. Consider the growing
sequence G = G(OP Thor ), and suppose that p(G) ≤ ε · p(OP Thor ). Then we
might simply delete G, and shift the remaining items OP Thor \ G = ∪j BjG
66 4.1 A PTAS for L-packings
as follows. Let dxey denote the smallest multiple of y not smaller than x.
We consider each set BjG separately. For each such set, we define a baseline
vertical coordinate basej = dbottom(gj )eh(gj )/2 , where bottom(gj ) is the bottom
coordinate of gj in the original packing. We next round up the height of i ∈ BjG
to ĥ(i) := dh(i)eh(gj )/(2n) , and pack the rounded items of BjG as low as possible
above the baseline. The reader might check that the possible top coordinates
for rounded items fall in a polynomial size set (using Lemma 39). It is also not
hard to check that items are not shifted up.
We use recursion in order to handle the case p(G) > ε · p(OP Thor ). Rather
than deleting G, we consider each BjG and build a new growing subsequence
for each such set. We repeat the process recursively for rhor many rounds. Let
G r be the union of all the growing subsequences in the recursive calls of level r.
Since the sets G r are disjoint by construction, there must exist a value rhor ≤ 1ε
such that p(G rhor ) ≤ ε · p(OP Thor ). Therefore we can apply the same shifting
argument to all growing subsequences of level rhor (in particular we delete all
of them). In the remaining growing subsequences we can afford to delete 1
out of 1/ε consecutive items (with a small loss of the profit), and then apply a
similar shifting argument.
Analogously, if gj 6= dq , we set
X X
shif t(gj ) = baseq + h(gk ) + shif tmax
k .
gk ∈G,dq <gk ≤gj gk ∈G,dq ≤gk <gj
This concludes the description of delete&shift. We next show that the final
packing has the desired properties. Next lemma shows that the total profit of
deleted items is small for a proper choice of the starting round parameter rhor .
Lemma 41. There is a choice of rhor ∈ {1, . . . , 1ε } such that the final set Dhor
of deleted items satisfies p(Dhor ) ≤ 2ε · p(OP Thor ).
Proof. Let G r denote the union of the sets G(B) computed by all the recursive
calls with input round parameter r. Observe that by construction these sets
are disjoint. Let also Dr be the union of the sets D0 (B) on those calls (the
union of sets D(B) for r = rhor ). By Proposition 40 and the disjointness of
sets G r one has
X X
p(Dhor ) = p(Dr ) ≤ ε · p(G r ) + p(Drhor ) ≤ ε · p(OP Thor ) + p(Drhor ).
1≤r≤rhor r<rhor
Next lemma shows that, intuitively, items are only shifted down with respect
to the initial packing.
Lemma 42. Let (D, shif t) be the output of some execution of the algorithm
delete&shift(B, r). Then, for any i ∈ B \ D, shif t(i) ≤ topB (i).
1 X h(gj )
≤ topB (gj ) − h(gj ) + h(k) + n · = topB (i).
2 2n
k∈BjG ,k≤i
= topB (i).
An analogous chain of inequalities shows that shif t(gj ) ≤ topB (gj ) for any
gj ∈ G \ D0 . A similar proof works for the special case baseq = 0.
It remains to show that the final set of values of top(i) = shif t(i) has the
desired properties. This is the most delicate part of our analysis. We define
a set T r of candidate top coordinates recursively in r. Set T 1 contains, for
any item j ∈ Ihor , and any integer 1 ≤ a ≤ 4n2 , the value a · h(j) 2n
. Set T r ,
for r > 1 is defined recursively with respect to to T r−1
. For any item j,
any integer 0 ≤ a ≤ 2n − 1, any tuple of b ≤ 1/ε − 1 items j(1), . . . , j(b),
and any tuple of c ≤ 1/ε values s(1), . . . , s(c) ∈ T r−1 , T r contains the sum
a · h(j) + bk=1 h(j(k)) + ck=1 s(k). Note that sets T r can be computed based
P P
2
on the input only (without knowing OP T ). It is easy to show that T r has
polynomial size for r = Oε (1).
r+2+(r−1)ε
Lemma 43. For any integer r ≥ 1, |T r | ≤ (2n) εr−1 .
69 4.1 A PTAS for L-packings
Proof. We prove the claim by induction on r. The claim is trivially true for
r = 1 since there are n choices for item j and 4n2 choices for the integer a,
hence altogether at most n · 4n2 < 8n3 choices. For r > 1, the number of
possible values of T r is at most
1/ε−1 1/ε
1 1
X X
n · 2n · nb · |T r−1 |c ≤ 4n2 · n ε −1 · |T r−1 | ε
b=0 c=0
1
r+1+(r−2)ε
1ε
+1
≤ (2n) ε (2n) εr−2
r+2+(r−1)ε
≤ (2n) εr−1 .
The next lemma shows that the values of shif t returned by delete&shift
for round parameter r belong to T r , hence the final top coordinates belong to
T := T rhor .
Lemma 44. Let (D, shif t) be the output of some execution of the procedure
delete&shift(B, r). Then, for any i ∈ B \ D, shif t(i) ∈ T r .
Proof. We prove the claim by induction on r. For the case r = 1, recall that
for any i ∈ BjG one has
X
shif t(i) = dbottomB (gj )eh(gj )/2 + dh(k)eh(gj )/(2n) .
k∈BjG ,k≤i
By Lemma 39, bottomB (dq ) ≤ (n − 1)h(dq ), therefore dbottomB (dq )eh(dq )/2 =
a· h(d2 q ) for some integer 1 ≤ a ≤ 2(n−1)+1. By Proposition 40, |{gk ∈ G, dq <
gk ≤ gj }| ≤ 1/ε−1. Hence gk ∈G,dq <gk ≤gj h(gk ) is a value contained in the set of
P
sums of b ≤ 1/ε−1 item heights. By inductive hypothesis shif tmax k , shif tj (i) ∈
r−1
. Hence by a similar argument the value of max
P
T gk ∈G,dq ≤gk <gj shif tk +
shif tj (i) is contained in the set of sums of c ≤ 1/ε − 1 + 1 values taken
from T r−1 . Altogether, shif t(i) ∈ T r . A similar argument, without the term
shif tj (i), shows that shif t(gj ) ∈ T r for any gj ∈ G \ D0 . The proof works
similarly in the case baseq = 0 by setting a = 0. The claim follows.
items with both sides larger than ε · N : any feasible solution can contain at
most 1/ε2 such items, and discarding them decreases the cardinality of OP T
at most by a factor 1 + ε. Let OP T denote this slightly sub-optimal solution
obtained by removing large items.
We will need the following technical lemma, which also works unchanged
for the weighted case. See also Figure 4.1.(b)–(d).
71 4.2 A Simple Improved Approximation for Cardinality 2DGK
Lemma 45. Let H and V be given subsets of items from some feasible solution
with width and height strictly larger than N/2, resp. Let hH and wV be the
total height and width of items of H and V , resp. Then there exists an L-
packing of a set AP X ⊆ H ∪ V with p(AP X) ≥ 34 (p(H) + p(V )) into the area
L = ([0, N ] × [0, hH ]) ∪ ([0, wV ] × [0, N ]).
For our algorithm, we consider the following three packings. The first uses
an L that occupies the full knapsack, i.e., wL = hL = N . Let OP Tlong ⊆ OP T
be the items in OP T with height or width strictly larger than N/2 and define
OP Tshort = OP T \OP Tlong . We apply Lemma 45 to OP Tlong and hence obtain
a packing for this L with a profit of at least 34 w(OP Tlong ). We run our PTAS
for L-packings from Theorem 34 on this L, the input consisting of all items in
I having one side longer than N/2. Hence we obtain a solution with profit at
least ( 43 − O(ε))w(OP Tlong ).
For the other two packings we employ the one-sided resource augmentation
PTAS given from Lemma 14 and Theorem 12. We apply this algorithm to the
slightly reduced knapsacks [0, N ] × [0, N/(1 + ε)] and [0, N/(1 + ε)] × [0, N ] such
that in both cases it outputs a solution that fits in the full knapsack [0, N ] ×
[0, N ] and whose profit is by at most a factor 1 + O(ε) worse than the optimal
solution for the respective reduced knapsacks. Will prove in Theorem 46 that
one of these solutions yields a profit of at least ( 12 − O(ε))p(OP T ) + ( 14 −
O(ε))p(OP Tshort ) and hence one of our packings yields a ( 16
9
+ε)-approximation.
Proof. Let OP T be the considered optimal solution with opt = p(OP T ). Recall
that there are no large items. Let also OP Tvert ⊆ OP T be the (vertical )
items with height more than ε · N (hence with width at most ε · N ), and
OP Thor = OP T \ OP Tver (horizontal items). Note that with this definition
both sides of a horizontal item might have a length of at most ε · N . We let
optlong = p(OP Tlong ) and optshort = p(OP Tshort ).
As mentioned above, our L-packing PTAS achieves a profit of at least ( 43 −
O(ε))optlong which can be seen by applying Lemma 45 with H = OP Tlong ∩
OP Thor and V = OP Tlong ∩ OP Tver . In order to show that the other two
packings yield a good profit, consider a random horizontal strip S = [0, N ] ×
[a, a + ε · N ] (fully contained in the knapsack) where a ∈ [0, (1 − ε)N ) is
chosen uniformly at random. We remove all items of OP T intersecting S.
Each item in OP Thor and OP Tshort ∩ OP Tver is deleted with probability at
most 3ε and 21 + 2ε, resp. Therefore the total profit of the remaining items
is in expectation at least (1 − 3ε)p(OP Thor ) + ( 21 − 2ε)p(OP Tshort ∩ OP Tvert ).
Observe that the resulting solution can be packed into a restricted knapsack of
size [0, N ]×[0, N/(1+ε)] by shifting down the items above the horizontal strip.
Therefore, when we apply the resource augmentation algorithm in Jansen and
Solis-Oba [2007] to the knapsack [0, N ] × [0, N/(1 + ε)], up to a factor 1 − ε,
73 4.3 Weighted Case Without Rotations
• small if hi , wi ≤ εsmall N ;
• intermediate otherwise (i.e., at least one side has length in (εsmall N, εlarge N ]).
74 4.3 Weighted Case Without Rotations
We also call skewed items that are horizontal or vertical. We let Rsmall , Rlarge ,
Rhor , Rver , Rskew , and Rint be the items which are small, large, horizontal, ver-
tical, skewed, and intermediate, respectively. The corresponding intersection
with OP T defines the sets OP Tsmall , OP Tlarge , OP Thor , OP Tver , OP Tskew ,
OP Tint , respectively.
Observe that |OP Tlarge | = O(1/ε2large ) and since we are allowed to drop
Oε (1) items from now on we ignore OP Tlarge . The next lemma shows that we
can neglect also OP Tint .
Lemma 47. For any constant ε > 0 and positive increasing function f (·),
f (x) > x, there exist constant values εlarge , εsmall , with ε ≥ εlarge ≥ f (εsmall ) ≥
Ωε (1) and εsmall ∈ Ωε (1) such that the total profit of intermediate rectangles is
bounded by εp(OP T ). The pair (εlarge , εsmall ) is one pair from a set of Oε (1)
pairs and this set can be computed in polynomial time.
Figure 4.3. Illustration of two specific types of corridors: spirals (A) and rings
(B)..
i ∈ {0, ..., k − 1}, there exists a vertical (resp. horizontal) line segment `i such
that both ei and e0i intersect `i and `i does not intersect any other edge. See
Figures 4.3 and 4.4 for examples. Let us focus on minimum length such `i ’s:
then the width α of the corridor is the maximum length of any such `i . We
say that an open (resp. closed) corridor of the above kind has k − 2 (resp. k)
bends. A corridor partition is a partition of the knapsack into corridors.
3. the number of corridors is Oε,εlarge (1) and each corridor has width at most
εlarge N and has at most 1/ε bends.
Since we are allowed to drop Oε (1) items from now on we ignore OP Tcorr cross
. We
next identify some structural properties of the corridors that are later exploited
in our analysis. Observe that an open (resp. closed) corridor of the above type
is the union of k − 1 (resp. k) boxes, that we next call subcorridors (see also
Figure 4.4). Each such box is a maximally large rectangle that is contained in
the corridor. The subcorridor Si of an open (resp. closed) corridor of the above
kind is the one containing edges ei , e2k−i (resp. ei , ei0 ) on its boundary. The
length of Si is the length of the shortest such edge. We say that a subcorridor
is long if its length is more than N/2, and short otherwise. The partition of
subcorridors into short and long will be crucial in our analysis.
We call a subcorridor horizontal (resp. vertical ) if the corresponding edges
are so. Note that each rectangle in OP Tcorr is univocally associated with the
76 4.3 Weighted Case Without Rotations
only subcorridor that fully contains it: indeed, the longer side of a skewed
rectangle is longer than the width of any corridor. Consider the sequence of
consecutive subcorridors S1 , . . . , Sk0 of an open or closed corridor. Consider two
consecutive corridors Si and Si0 , with i0 = i + 1 in the case of an open corridor
and i0 = (i+1) (mod k 0 ) otherwise. First assume that Si0 is horizontal. We say
that Si0 is to the right (resp. left) of Si if the right-most (left-most) boundary
of Si0 is to the right (left) of the right-most (left-most) boundary of Si . If
instead Si0 is vertical, then Si must be horizontal and we say that Si0 is to the
right (left) of Si if Si is to the left (right) of Si0 . Similarly, if Si0 is vertical, we
say that Si0 is above (below) Si if the top (bottom) boundary of Si0 is above
(below) the top (bottom) boundary of Si . If Si0 is horizontal, we say that it is
above (below) Si if Si (which is vertical) is below (above) Si0 . We say that the
pair (Si , Si0 ) forms a clockwise bend if Si is horizontal and Si0 is to its bottom-
right or top-left, and the complementary cases if Si is vertical. In all the other
cases the pairs form a counter-clockwise bend. Consider a triple (Si , Si0 , Si00 )
of consecutive subcorridors in the above sense. It forms a U -bend if (Si , Si0 )
and (Si0 , Si00 ) are both clockwise or counterclockwise bends. Otherwise it forms
a Z-bend. In both cases Si0 is the center of the bend, and Si , Si00 its sides.
An open corridor whose bends are all clockwise (resp. counter-clockwise) is a
spiral. A closed corridor with k = 4 is a ring. Note that in a ring all bends are
clockwise or counter-clockwise, hence in some sense it is the closed analogue of
a spiral. We remark that a corridor whose subcorridors are all long is a spiral
or a ring3 . As we will see, spirals and rings play a crucial role in our analysis.
In particular, we will exploit the following simple fact.
α
S3,4 S4
S1
S3
S1,2 S2 S2,3
Figure 4.4. Left: The subcorridors S1 and S3 are vertical, S2 and S4 are
horizontal. The subcorridor S3 is on the top-right of S2 . The curve on the
bottom left shows the boundary curve between S1 and S2 . The pair (S3 , S4 )
forms a clockwise bend and the pair (S2 , S3 ) forms a counter-clockwise bend.
The triple (S1 , S2 , S3 ) forms a U -bend and the triple (S2 , S3 , S4 ) forms a Z-
bend. Right: Our operation that divides a corridor into Oε (1) boxes and Oε (1)
shorter corridors. The dark gray items show thin items that are removed in this
operation. The light gray items are fat items that are shifted to the box below
their respective original box. The value α denotes the width of the depicted
corridor.
region shared by the two subcorridors. Then the boundary curve among them
is any simple rectilinear polygon inside Si,i0 that decreases monotonically from
its top-left corner to its bottom-right one and that does not cut any rectangle
in these subcorridors. For a boundary horizontal (resp. vertical) subcorridor of
an open corridor (i.e., a subcorridor containing e0 or e2k−1 ) we define a dummy
boundary curve given by the vertical (resp. horizontal) side of the subcorridor
that coincides with a (boundary) edge of the corridor.
Remark. Each subcorridor has two boundary curves (including possibly dummy
ones). Furthermore, all its items are fully contained in the region delimited by
such curves plus the two edges of the corridor associated with the subcorridor
(private region).
Given a corridor, we partition its area into a constant number of boxes
as follows (see also Figure 4.4, and Adamaszek and Wiese [2013] for a more
detailed description of an analogous construction). Let S be one of its boundary
subcorridors (if any), or the central subcorridor of a U -bend. Note that one
such S must exist (trivially for an open corridor, otherwise by Lemma 49.2). In
the corridor partition, there might be several subcorridors fulfilling the latter
condition. We will explain later in which order to process the subcorridors,
here we explain only how to apply our routine to one subcorridor, which we
call processing of subcorridor..
Suppose that S is horizontal with height b, with the shorter horizontal
associated edge being the top one. The other cases are symmetric. Let εbox > 0
be a sufficiently small constant to be defined later. If S is the only subcorridor
in the considered corridor, S forms a box and all its items are marked as fat.
Otherwise, we draw 1/εbox horizontal lines that partition the private region of S
into subregions of height εbox b. We mark as thin the items of the bottom-most
(i.e., the widest) such subregion, and as killed the items of the subcorridor
cut by these horizontal lines. All the remaining items of the subcorridor are
marked as fat.
For each such subregion, we define an associated (horizontal) box as the
largest axis-aligned box that is contained in the subregion. Given these boxes,
we partition the rest of the corridor into 1/εbox corridors as follows. Let S 0
be a corridor next to S, say to its top-right. Let P be the set of corners of
the boxes contained in the boundary curve between S and S 0 . We project P
vertically on the boundary curve of S 0 not shared with S, hence getting a set
P 0 of 1/εbox points. We iterate the process on the pair (S 0 , P 0 ). At the end of
the process, we obtain a set of 1/εbox boxes from the starting subcorridor S,
plus a collection of 1/εbox new (open) corridors each one having one less bend
79 4.3 Weighted Case Without Rotations
with respect to the original corridor. Later, we will also apply this process on
the latter corridors. Each newly created corridor will have one bend less than
the original corridor and thus this process eventually terminates. Note that,
since initially there are Oε,εlarge (1) corridors each one with O(1/ε) bends, the
final number of boxes is Oε,εlarge ,εbox (1). See Figure 4.4 for an illustration.
Remark. Assume that we execute the above procedure on the subcorridors until
there is no subcorridor left on which we can apply it. Then we obtain a partition
of OP Tcorr into disjoint sets OP Tthin , OP Tf at , and OP Tkill of thin, fat, and
killed items, respectively. Note that each order to process the subcorridors leads
to different such partition. We will define this order carefully in our analysis.
Remark. By a simple shifting argument, there exists a packing of OP Tf at
into the boxes. Intuitively, in the above construction each subregion is fully
contained in the box associated with the subregion immediately below (when no
lower subregion exists, the corresponding items are thin).
We will from now on assume that the shifting of items as described in
Remark 4.3.3 has been done.
The following lemma summarizes some of the properties of the boxes and
of the associated partition of OP Tcorr (independently from the way ties are
broken). Let Rhor and Rver denote the set of horizontal and vertical input
items, respectively.
Lemma 50. The following properties hold:
2. For any given constant εring > 0 there is a sufficiently small εbox > 0
such that the total height (resp. width) of items in OP Tthin ∩ Rhor (resp.
OP Tthin ∩ Rver ) is at most εring N .
Proof. (1) Each horizontal (resp. vertical) line in the construction can kill
at most 1/εlarge items, since those items must be horizontal (resp. vertical).
Hence we kill Oε,εlarge ,εbox (1) items in total.
(2) The mentioned total height/width is at most εbox N times the number of
subcorridors, which is Oε,εlarge (1). The claim follows for εbox small enough.
4.3.4 Containers
Assume that we applied the routine described in Section 4.3.3 above until each
corridor is partitioned into boxes. We explain how to partition each box into
80 4.3 Weighted Case Without Rotations
inside them satisfy some extra properties that are useful in the design of an
efficient algorithm. This part is similar in spirit to prior work, though here we
present a refined analysis that simplifies the algorithm (in particular, we can
avoid LP rounding).
A container is a box labeled as horizontal, vertical, or area. A container
packing of a set of items I 0 into a collection of non-overlapping containers has
to satisfy the following properties:
Our main building block is the resource augmentation packing Lemma 14.
Applying it to each box yields the following lemma.
Lemma 51 (Container Packing Lemma). For a given constant εra > 0, there
exists a set OP Tfcont
at ⊆ OP Tf at such that there is a container packing for all
apart from Oε (1) items in OP Tfcont
at such that:
1. p(OP Tfcont
at ) ≥ (1 − O(ε))p(OP Tf at );
2. The number of containers is Oε,εlarge ,εbox ,εra (1) and their sizes belong to a
set of cardinality nOε,εlarge ,εbox ,εra (1) that can be computed in polynomial
time.
Proof. Let us focus on a specific box of size a×b from the previous construction
in Section 4.3.3, and on the items OP Tbox ⊆ OP Tf at inside it. If |OP Tbox | =
Oε (1) then we can simply create one container for each item and we are done.
Otherwise, assume without loss of generality that this box (hence its items)
is horizontal. We obtain a set OP Tbox by removing from OP Tbox all items
intersecting a proper horizontal strip of height 3εb. Clearly these items can be
repacked in a box of size a × (1 − 3ε)b. By a simple averaging argument, it is
possible to choose the strip so that the items fully contained in it have total
81 4.3 Weighted Case Without Rotations
Remark. In the analysis sometimes we will not need the boundary L. This
case is captured by setting N 0 = 0 and ` = N ( degenerate L case).
82 4.3 Weighted Case Without Rotations
Lemma 52. Let OP TL&C be the most profitable solution that is packed by an
L&C packing. Then p(OP TL&C ) ≥ ( 17
9
− O(ε))p(OP T ).
In the remainder of this section we prove Lemma 52, assuming that we can
drop Oε (1) items at no cost. Hence, formally we will prove that there is an
L&C packing I 0 and a set of Oε (1) items Idrop such that p(I 0 ) + p(Idrop ) ≥
9
( 17 − O(ε))p(OP T ). Subsequently, we will prove Lemma 52 in full generality
(without dropping any items).
The proof of Lemma 52 involves some case analysis. Recall that we clas-
sify subcorridors into short and long, and horizontal and vertical. We further
partition short subcorridors as follows: let S1 , . . . , Sk0 be the subcorridors of
a given corridor, and let S1s , . . . , Sks00 be the subsequence of short subcorridors
(if any). Mark Sis as even if i is so, and odd otherwise. Note that corridors
are subdivided into several other corridors during the box construction process
(see the right side of Figure 4.4), and these new corridors might have fewer
subcorridors than the initial corridor. However, the marking of the subcorri-
dors (short, long, even, odd, horizontal, vertical) is inherited from the marking
of the original subcorridor.
We will describe now 7 different ways to partition the subcorridors into
boxes, for some of them we delete some of the subcorridors. Each of these dif-
ferent processing orders will give different sets OP Tthin , OP Tkill and OP Tfcontat ,
and based on these, we will partition the items into three sets. We will then
prove three different lower bounds on p(OP TL&C ) with respect to the sizes of
these three sets using averaging arguments about the seven cases.
Subcase a
3 2
3 2
2 1 3 1
2 3
Case 1 1 1
1 3 1 2
Subcase b
Subcase a
3 2
Case 2 3 2
1 1
2 3
1 2 1 3
1 1 1 1
3 2
Subcase b
Figure 4.5. Figure for Case 1 and 2. The knapsack on the left contains two
corridors, where short subcorridors are marked light gray and long subcorri-
dors are marked dark gray. In case 1, we delete vertical short subcorridors
and then consider two processing orders in subcases a and b. In case 2, we
delete horizontal short subcorridors and again consider two processing orders
in subcases a and b.
Cases 3a, 3b: Even/odd short subcorridors. We delete the odd (or
even) short subcorridors and then process even (resp. odd) short subcorridors
last. We exploit the fact that each residual corridor contains at most one
short subcorridor. Then, if there is another (long) subcorridor, there is also
one which is boundary (trivially for an open corridor) or the center of a U -
bend (by Lemma 49, Property 2). Hence we can always process some long
subcorridor leaving the unique short subcorridor as last one. This gives two
cases.
84 4.3 Weighted Case Without Rotations
Case 4: Fat only. Do not delete any short subcorridor. Process subcorridors
in any feasible order.
In each of the cases, we apply the procedure described in Section 4.3.4
to partition each box into Oε (1) containers. We next label items as follows.
at , OP Tthin , and OP Tkill in each
Consider the classification of items into OP Tfcont
one of the 7 cases above. Then:
at , OP TT = OP Tthin , and OP TK =
Proof. Let us initialize OP TF = OP Tfcont
OP Tkill by considering one of the above cases. Next we consider the aforemen-
tioned cases, hence moving some items in OP TF to either OP TT or OP TK .
Note that initially p(OP TF ∪OP TT )+p(OP Tkill )+p(OP Tlarge )+p(OP Tcorr
cross
)≥
(1 − O(ε))p(OP T ) by Lemma 48 and hence we keep this property.
Let Ilc and Isc denote the items in long and short corridors, respectively.
We also let OP TLF = Ilc ∩ OP TF , and define analogously OP TSF , OP TLT ,
and OP TLF . The next three lemmas provide a lower bound on the case of a
degenerate L.
Lemma 55. p(OP TL&C ) ≥ p(OP TLF ) + p(OP TLT )/2 + p(OP TSF )/2.
Proof. Consider the sum of the profit of the packed items corresponding to the
in total four subcases of cases 1 and 2. Each i ∈ OP TLF appears 4 times in
the sum (as items in OP TF are fat in all cases and all long subcorridors get
85 4.3 Weighted Case Without Rotations
Lemma 56. p(OP TL&C ) ≥ p(OP TLF ) + p(OP TSF )/2 + p(OP TST )/2.
Proof. Consider the sum of the number of packed items corresponding to cases
3a and 3b. Each i ∈ OP TLF appears twice in the sum as it is fat and all long
subcorridors get processed. Each i ∈ OP TSF ∪ OP TST appears at least once
in the sum by Remark 4.3.5: An item i ∈ OP TSF is deleted in one of the two
cases (depending on whether it is in an even or odd subcorridor) and otherwise
fat. An item i ∈ OP TST is also deleted in one of the two cases and otherwise its
subcorridor is processed last. The claim follows by an averaging argument.
There is one last (and slightly more involved) case to be considered, corre-
sponding to a non-degenerate L.
1−O(ε)
Lemma 57. p(OP TL&C ) ≥ 34 p(OP TLT ) + p(OP TST ) + 2
p(OP TSF ).
Combining the above Lemmas 53, 54, 55, 56, and 57 we achieve the desired
approximation factor, assuming that the (dropped) Oε (1) items in OP Tkill ∪
cross
OP Tlarge ∪ OP Tcorr have zero profit. The worst case is obtained, up to
1 − O(ε) factors, for p(OP TLT ) = p(OP TSF ) = p(OP TST ) and p(OP TLF ) =
5p(OP TLT )/4. This gives p(OP TLT ) = 4/17 · p(OP TT ∪ OP TF ) and a total
profit of 9/17 · p(OP TT ∪ OP TF ).
Lemma 58. In the packings due to Lemmas 54, 55, 56, and 57 the total area
occupied by containers is at most min{(1 − 2ε)N 2 , a(OP Tcorr ) + εra N 2 }.
Proof. Consider the first upper bound on the area. We have to distinguish
between the containers considered in Lemma 57 and the remaining cases. In
the first case, there is a region not occupied by the boundary L nor by the
containers of area at least 4εN 2 − 4ε2 N 2 − 4εring N 2 ≥ 2εN 2 for εring small
enough, e.g., εring ≤ 2 suffices. The claim follows. For the remaining cases,
87 4.3 Weighted Case Without Rotations
For the sake of simplicity, suppose that any empty space in the optimal packing
of OP Tcorr ∪ OP Tsmall is filled in with dummy small items of profit 0, so that
a(OP Tcorr ∪ OP Tsmall ) = N 2 . We observe that the area of the free cells is at
least (1 − O(ε))a(OP Tsmall ): Either, a(OP Tsmall ) ≥ εN 2 and then the area of
the free cells is at least a(OP Tsmall ) − 3ε2 N 2 ≥ (1 − 3ε)a(OP Tsmall ); otherwise,
88 4.3 Weighted Case Without Rotations
we have that the area of the free cells is at least εN 2 > a(OP Tsmall ). Therefore
we can select a subset of small items OP Tsmall
0
⊆ OP Tsmall , with p(OP Tsmall
0
)≥
(1 − O(ε))p(OP Tsmall ) and area a(OP Tsmall ) ≤ (1 − O(ε))a(OP Tsmall ) that
can be fully packed into free cells using classical Next Fit Decreasing Height
algorithm (NFDH) according to Lemma 1 described later. The key argument
for this is that each free cell is by a factor 1/ε larger in each dimension than
each small item.
Thus, we have proven now that if the items in OP Tkill ∪OP Tlarge ∪OP Tcorr
cross
had zero profit, then there is an L&C-packing for the skewed and small items
with a profit of at least 9/17 · p(OP Tcorr ) + (1 − O())(OP Tsmall ) ≥ (9/17 −
O())p(OP T ).
we define the set K(i + 1) of items that are somehow “in our way” during the
decomposition process (e.g., items that are not fully contained in some corridor
of the corridor partition), but which we cannot delete directly as they might
have large profit. These items are similar to the killed items in the previous
argumentation. However, using a shifting argument we can simply show that
after at most k < 1/ε steps of this process, we encounter a set K(k) of low
total profit, that we can remove, at which point we can apply almost the same
argumentation as in Lemmas 54, 55, and 56 to obtain lower bounds on the
profit of an optimal L&C packing (Section 4.3.7).
We initiate this iterative process as follows: Denote by K(0) a set contain-
ing all items that are killed in at least one of the cases arising in Section 4.3.5
(the set OP TK in that Section) and additionally the large items OP Tlarge
and the Oε (1) items in OP Tcorrcross
(in fact OP Tlarge ⊆ OP Tcorr
cross
). Note that
|K(0)| ≤ Oε (1). If p(K(0)) ≤ ε · p(OP T ) then we can simply remove these
rectangles (losing only a factor of 1 + ε) and then apply the remaining argu-
mentation exactly as above and we are done. Therefore, from now on suppose
that p(K(0)) > ε · p(OP T ).
• OP Tlarge (C) contains all items i ∈ OP T (C) with h(i ∩ C) > εlarge h(C)
and w(i ∩ C) > εlarge w(C),
• OP Thor (C) contains all items i ∈ OP T (C) with h(i ∩ C) ≤ εsmall h(C)
and w(i ∩ C) > εlarge w(C), and
• OP Tver (C) contains all items i ∈ OP T (C) with h(i ∩ C) > εlarge h(C)
and w(i ∩ C) ≤ εsmall w(C).
Lemma 60. For any constant ε > 0 and positive increasing function f (·),
f (x) > x, there exist constant values εlarge , εsmall , with ε ≥ εlarge ≥ f (εsmall ) ≥
Ωε (1) and εsmall ∈ Ωε (1) such that the total profit of intermediate rectangles is
bounded by εp(OP T ).
For each cell C that is not entirely covered by some item in K(t) we add
all rectangles in OP Tlarge (C) that are not contained in K(t) to K(t + 1). Note
that here, in contrast to before, we do not remove small items from the packing
but keep them.
Based on the items OP Tskew (Ct ) := ∪C∈Ct OP Thor (C) ∪ OP Tver (C) we cre-
ate a corridor decomposition and consequently a box decomposition of the
knapsack. To make this decomposition clearer, we assume that we first stretch
the non-uniform grid into a uniform [0, 1] × [0, 1] grid. After this operation,
for each cell C and for each element of OP Thor (C) ∪ OP Tver (C) we know
that its height or width is at least εlarge · 1+2|K(t)|1
. We apply Lemma 48 on
the set OP Tskew (Ct ) which yields a decomposition of the [0, 1] × [0, 1] square
into at most Oε,εlarge ,K(t) (1) = Oε,εlarge (1) corridors. The decomposition for the
stretched [0, 1] × [0, 1] square corresponds to the decomposition for the original
knapsack, with the same items being intersected. Since we can assume that all
items of OP T are placed within the knapsack so that they have integer coordi-
nates, we can assume that the corridors of the decomposition also have integer
coordinates. We can do that, because shifting the edges of the decomposition
to the closest integral coordinate will not make the decomposition worse, i.e.,
no new items of OP T will be intersected.
We add all rectangles in OP Tskew (Ct ) that are not contained in a corridor (at
most Oε (1) many) and that are not contained in K(t) to K(t + 1). The corridor
partition has the following useful property: we started with a fixed (optimal)
91 4.3 Weighted Case Without Rotations
solution OP T for the overall problem with a fixed placement of the items in
this solution. Then we considered the items in OP Tskew (Ct ) and obtained the
sets OP Tcorr ⊆ OP Tskew (Ct ) and OP Tcorr
cross
⊆ OP Tcorr . With the mentioned
fixed placement, apart from the Oε (1) items in OP Tcorr
cross
, each item in OP Tcorr
is contained in one corridor. In particular, the items in OP Tcorr do not overlap
the items in K(t). We construct now a partition of the knapsack into Oε (1)
corridors and Oε (1) containers where each container contains exactly one item
from K(t). The main obstacle is that there can be an item i ∈ K(t) that
overlaps a corridor (see Figure 4.6). We solve this problem by applying the
following lemma on each such corridor.
Lemma 61. Let S be an open corridor with b(S) bends. Let I 0 ⊆ OP T be a
collection of items which intersect the boundary of S with I 0 ∩OP Tskew (Ct ) = ∅.
Then there is a collection of |I 0 | · b(S) line segments L within S which partition
S into corridors with at most b(S) bends each such that no item from I 0 is
intersected by L and there are at most Oε (|I 0 | · b(S)) items of OP Tskew (Ct )
intersected by line segments in L.
Proof. Let i ∈ I 0 and assume without loss of generality that i lies within a
horizontal subcorridor Si of the corridor S. If the top or bottom edge e of i lies
within Si , we define a horizontal line segment ` which contains the edge e and
which is maximally long so that it does not intersect the interior of any item
in I 0 , and such that it does not cross the boundary curve between Si and an
adjacent subcorridor, or an edge of the boundary of S (we can assume without
loss of generality that e does not intersect the boundary curve between Si and
some adjacent subcorridor). We say that ` crosses a boundary curve c (or an
edge e of the boundary of S) if c \ ` (or e \ `) has two connected components.
We now “extend” each end-point of ` which does not lie at the boundary of
some other item of I 0 or at the boundary of S, we call such an end point a loose
end. For each loose end x of ` lying on the boundary curve cij partitioning the
subcorridors Si and Sj , we introduce a new line `0 perpendicular to `, starting
at x and crossing the subcorridor Sj such that the end point of `0 is maximally
far away from x subject to the constraint that `0 does not cross an item in I 0 ,
another boundary curve inside S, or the boundary of S. We continue iteratively.
Since the corridor has b(S) bends, after at most b(S) iterations this operation
will finish. We repeat the above operation for every item i ∈ I 0 , and we denote
by L the resulting set of line segments, see Figure 4.6 for a sketch. Notice that
|L| = b(S) · |I 0 |. By construction, if an item i ∈ OP Tskew (Ct ) is intersected by
a line in L then it is intersected parallel to its longer edge. Thus, each line
segment in L can intersect at most Oε (1) items of OP Tskew (Ct ). Thus, in total
92 4.3 Weighted Case Without Rotations
there are at most Oε,εlarge (|I 0 | · b(S)) items of OP Tskew (Ct ) intersected by line
segments in L.
Lemma 62. Let S be a closed corridor with b(S) bends. Let OP Tskew (S) denote
the items in OP Tskew (Ct ) that are contained in S. Let I 0 ⊆ OP T be a collection
of items which intersect the boundary of S with I 0 ∩ OP Tskew (Ct ) = ∅. Then
there is a collection of Oε (|I 0 |2 /ε) line segments L within S which partition S
into a collection of closed corridors with at most 1/ε bends each and possibly
an open corridor with b(S) bends such that no item from I 0 is intersected by
L and there is a set of items OP Tskew 0
(S) ⊆ OP Tskew (S) with |OP Tskew
0
(S)| ≤
Oε (|I | ) such that the items in OP Tskew (S) \ OP Tskew (S) intersected by line
0 2 0
segments in L have a total profit of at most O(ε) · p(OP Tskew (Ct )).
Proof. Similarly as for the case of open corridors, we take each item i ∈ I 0 whose
edge e is contained in S, and we create a path containing e that partitions S.
Here the situation is a bit more complicated, as our newly created paths could
extend over more than 1ε bends inside S. In this case we will have to do some
shortcutting, i.e., some items contained in S will be crossed parallel to their
shorter edge and we cannot guarantee that their total number will be small.
However, we will ensure that the total weight of such items is small. We proceed
as follows (see Figure 4.6 for a sketch).
93 4.3 Weighted Case Without Rotations
items of OP Tskew
00
(S). This operation creates an open corridor with up to
O(|I |/ε) bends. We divide it into up to O(|I 0 |) corridors with up to 1/ε bends
0
each. Via a shifting argument we can argue that this loses at most a factor of
1 + ε in the profit due to these items. When we perform this operation for each
item i ∈ I 0 the total weight of items intersected parallel to their shorter edge
(i.e., due to the above shortcutting) is bounded by |I 0 | · |Iε0 | p(OP Tskew (S)) =
ε · p(OP Tskew (S)). This way, we introduce at most O(|I 0 |2 /ε) line segments.
Denote them by L. They intersect at most Oε (|I 0 |2 ) items parallel to their
respective longer edge, denote them by OP Tskew 0
(S). Thus, the set L satisfies
the claim of the lemma.
Then we partition the resulting corridors into boxes according to the different
cases described in Section 4.3.5. There is one difference to the argumentation
above: we define that the set OP Tf at contains not only skewed items contained
in the respective subregions of a subcorridor, but all items contained in such a
subregion. In particular, this includes items that might have been considered
as small items above. Thus, when we move items from one subregion to the box
94 4.3 Weighted Case Without Rotations
associated to the subregion below (see Remark 4.3.3) then we move every item
that is contained in that subregion. If an item is killed in one of the orderings
of the subcorridors to apply the procedure from Section 4.3.3 then we add it to
K(t + 1). Note that |K(t + 1)| ∈ Oε,εlarge ,εbox (1) and K(t) ∩ K(t + 1) = ∅. Also
note here that we ignore for the moment small items that cross the boundary
curves of the subcorridors; they will be taken care of in Section 4.3.7.
in the original packing i intersects with C and the area of i ∩ C is not smaller
95 4.3 Weighted Case Without Rotations
space in the cell C that is not used by any of the containers, similarly as above.
We first prove an analog of Lemma 58 of the setting above.
Proof. In our construction of the boxes we moved some of the items (within a
corridor). In particular, it can happen that we moved some items into C that
were originally in some other grid cell C 0 . This reduces the empty space in C
for the items in OP Tsmall
00
(C). Assume that there is a horizontal subcorridor
H intersecting C such that some items or parts of items within H were moved
into C that were not in C before. Then such items were moved vertically and
the corridor containing H must intersect the upper or lower boundary of C.
The part of this subcorridor lying within C has a height of at most εlarge · h(C).
Thus, the total area of C lost in this way is bounded by O(εlarge a(C)) which
includes analogous vertical subcorridors.
Like in Lemma 58 we argue that in each horizontal box of size a × b we
remove a horizontal strip of height 3εb and then the created containers lie in
a box of height (1 − 3ε)(1 + εra )b. In particular, if the box does not intersect
the top or bottom edge of C then within C its containers use only a box of
dimension a0 ×(1−3ε)(1+εra )b where a0 denotes the width of the box within C,
i.e., the width of the intersection of the box with C. If the box intersects the top
or bottom edge of C then we cannot guarantee that the free space lies within
C. However, the total area of such boxes is bounded by O(εlarge a(C)). We can
apply a symmetric argument to vertical boxes. Then, the total area of C used
by containers is at most (1 − 3ε)(1 + εra )a(C) + O(εlarge a(C)) ≤ (1 − 2ε)a(C).
This gives the claim of the lemma.
L&C packings
We iterate the above construction, obtaining pairwise disjoint sets K(1), K(2), ...
until we find a set K(k) such that p(K(k)) ≤ ε·OP T . Since the sets K(0), K(1), ...
are pairwise disjoint there must be such a value k with k ≤ 1/ε. Thus,
|K(k − 1)| ≤ Oε (1). We build the grid given by the x- and y-coordinates
of K(k − 1), giving a set of cells Ck . As described above we define the corridor
partition, the partition of the corridors into boxes (with the different orders to
process the subcorridors as described in Section 4.3.3) and finally into contain-
ers. Denote by OP Tsmall (Ck ) the resulting set of small items.
We consider the candidate packings based on the grid Ck . For each of the
six candidate packings with a degenerate L we can pack almost all small items
of the original packing. We define Ilc and Isc the sets of items in long and
short subcorridors in the initial corridor partition, respectively. Exactly as in
the cardinality case, a subcorridor is long if it is longer than N/2 and short
otherwise. As before we divide the items into fat and thin items and define
the sets OP TSF , OP TLT , and OP TST accordingly. Moreover, we define the set
OP TLF to contain all items in Ilc that are fat in all candidate packings plus
the items in K(k − 1).
Thus, we obtain the respective claims of Lemmas 54, 55, and 56 in the
weighted setting. For the following lemma let OP Tsmall := OP Tsmall (Ck ).
Lemma 64. Let OP TL&C the most profitable solution that is packed by an
L&C packing.
(b) p(OP TL&C ) ≥ (1 − O(ε))(p(OP TLF ) + p(OP TSF )/2 + p(OP TLT )/2 +
p(OP Tsmall ))
(c) p(OP TL&C ) ≥ (1 − O(ε))(p(OP TLF ) + p(OP TSF )/2 + p(OP TST )/2 +
p(OP Tsmall )).
with the construction of the boundary L and the assignment of the items into
it like in the unweighted case.
Lemma 65. For the solution OP TL&C we have that p(OP TL&C ) ≥ (1 −
O(ε))( 34 p(OP TLT ) + p(OP TST ) + 1−O(ε)
2
p(OP TSF ) + p(OP Tsmall )).
container packing instance with items Ishort = I \ Ilong using the PTAS from
Theorem 12. Finally, we output the most profitable solution that we computed.
Along this section, we will use ε, εring , εlarge , εsmall as defined in Section 4.3.
√
Let us define εL = ε. Note than εL ≥ ε ≥ εlarge ≥ εsmall . For simplicity
and readability of the section, sometimes we will slightly abuse the notation
and for any small constant depending on ε, εring , εlarge , εsmall , we will just use
O(εL ). Also, since the profit of each item is equal to 1, instead of p(I) for a set
of items I we will just write |I|. We will again consider the L&C packing as in
Section 4.3 and use Ilong , Ishort , OP TLF , OP TLT , OP TSF , OP TST etc. as defined
there. We will assume as in the proof of Lemma 57 that ` = 21 + 2εlarge N .
That way we make sure that no long rectangle belongs to a short subcorridor.
Let us define OP Tlong := Ilong ∩ OP T and OP Tshort := Ishort ∩ OP T . Now we
give a brief informal overview of the refinement and the cases before we go to
the details.
Overview of refined packing. For the refined packing we will consider
several L&C packings. Some of the packings are just extensions of previous
packings (such as from Theorem 46 and Lemma 64). Then we consider several
other new L&C packings where an L-region is packed with items from Ilong
and the remaining region is used for packing items from Ishort using Steinberg’s
theorem (See Theorem 3). Note that in the definition of L&C packing in Sec-
tion 4.3, we assumed the height of the horizontal part of L-region and width
of the vertical part of L-region are the same. However, for these new packings
we will consider L-region where the height of the horizontal part and width of
vertical part may not be the same. Now several cases arise depending on the
structure and profit of the L-region. To pack items in OP Tshort we have three
options:
1. We can pack items in Ishort using Steinberg’s theorem into one rectangular
region. Then we need both sides of the region to be greater than 21 + 2εlarge .
2. We can pack items in Ishort using Steinberg’s theorem such that vertical and
horizontal items are packed separately into different vertical and horizontal
99 4.4 Cardinality case without rotations
Now first, we start with some extensions of previous packings. Note that
by using analogous arguments as in the proof of Theorem 46, we can derive
the following inequalities leading to a 16
9
+ O(εL ) -approximation algorithm.
3
|OP TL&C | ≥ |OP Tlong | (4.1)
4
1 3
|OP TL&C | ≥ − O(εL ) |OP Tlong | + − O(εL ) |OP Tshort | (4.2)
2 4
Now from Lemma 50, items in OP Tshort ∩ OP TT can be packed into two
containers of size ` × εring N and εring N × `. We can adapt part of the results
in Lemma 64 to obtain the following inequalities.
Proposition 67. The following inequalities hold:
Now we prove a more general version of Lemma 57 which holds for the
cardinality case.
Proof. As in Lemma 57, we can pack 43 |OP Tlong ∩OP TT | and |OP Tshort ∩OP TT |
in a boundary L-region plus two boxes on the other two sides of the knapsack
and then a free square region with side length (1 − 3ε)N can be used to pack
items from OP Tshort \ OP TT . From Lemma 68, any subset of rectangles of
OP Tshort \ OP TT with total area at most (1 − O(εL ))N 2 /2 can be packed into
101 4.4 Cardinality case without rotations
that square region of length (1−3ε)N . Thus we sort rectangles from OP Tshort \
OP TT in the order of nondecreasing area and iteratively pick them until their
total area reaches (1 − O(εL ) − εsmall )N 2 /2. Using Steinberg’s theorem, there
exists a packing of the selected rectangles. If 2γ ≤ 1 − O(εL ) − εsmall then the
profit of this packing is |OP Tshort \ OP TT |, and otherwise the total profit is at
least 1−O(ε
2γ
L)
|OP Tshort \ OP TT |. The packing coming from Steinberg’s theorem
may not be container-based, but we can then use resource augmentation as in
Lemma 57 to obtain an L&C packing.
Now the following lemma will be useful when a(OP Tshort ) is large.
3 (3γ − 1 − O(εL ))
|OP TL&C | ≥ |OP Tlong | + |OP Tshort |.
4 4γ
Proof. Similar to Lemma 45 in Section 4.2, we start from the optimal packing
and move all rectangles in OP Tlong to the boundary such that all of them
are contained in a boundary ring. Note that unlike the case when we only
pack OP Tlong ∩ OP TT in the boundary region, the boundary ring formed by
OP Tlong may have width or height >> εring N . Let us call the 4 stacks in the
ring to be subrings. Let us assume that left and right subrings have width
α1 N and α2 N respectively and bottom and top subrings have height β1 N and
β2 N respectively. It is easy to see that we can arrange the subrings such that
α1 , α2 , β1 , β2 ≤ 1/2.
As a(OP Tshort ) > γN 2 , then a(OP Tlong ) < (1 − γ)N 2 . Let us define α =
α1 +α2 and β = β1 +β2 . Then (α +β)N · N2 ≤ a(OP Tlong ). Hence, α+β 2
< 1−γ.
Thus we get the following two inequalities:
(α + β) ≤ 2(1 − γ) (4.5)
(α + β)
a(OP Tshort ) ≤ 1 − N2 (4.6)
2
Now consider the case when we remove the top horizontal subring and con-
struct a boundary L-region as in Lemma 45. We will assume that rectangles in
the L-region are pushed to the left and bottom as much as possible. Then, the
boundary L-region has width (α1 + α2 )N and height β1 N . We will use Stein-
berg’s theorem to show the existence of a packing of rectangles from OP Tshort
in a subregion of the remaining space with width N −(α1 +α2 +ε)N and height
N − (β1 + ε)N , and use the rest of the area for resource augmentation to get
an L&C-based packing. Since γ ≥ 43 + ε + εlarge , we have that α + β + 2ε ≤
102 4.4 Cardinality case without rotations
where the last inequality follows from (4.5) and the fact that the expression is
decreasing as a function of (α + β).
Proof of Theorem 66. In the refined analysis, we will consider different solu-
tions and show that the best of them always achieves the claimed approxima-
tion guarantee. We will pack some rectangles in a boundary L-region (either
a subset of only OP Tlong ∩ OP TT or a subset of OP Tlong ) using the PTAS al-
gorithm for boundary L-region described in Section 4.1, and in the remaining
area of the knapsack (outside of the boundary L-region), we will pack a subset
of rectangles from OP Tshort .
Consider the ring as constructed in the beginning of the proof of Lemma
70. Then we remove the least profitable subring and repack the remaining
rectangles from OP Tlong in a boundary L-region. Without loss of generality,
assume that the horizontal top subring was the least profitable subring. The
other cases are analogous. We will use the same notation as in Lemma 70,
and also define wL = (α1 + α2 ), hL = β1 . Now let us consider two cases (see
Figure 4.7 for the overview of the subcases of case 2).
103 4.4 Cardinality case without rotations
• Case 1. wL ≤ εL , hL ≤ εL .
In this case, following the proof of Lemma 69 (using γ = 1), we can pack
3
4
|OP Tlong | + |OP Tshort ∩ OP TT | + 1−O(ε
2
L)
|OP Tshort \ OP TT |. This along with
inequalities (4.2), (4.3) and (4.4) gives
5
|OP TL&C | ≥ − O(εL ) |OP T | (4.7)
8
w L N > εL N
εN
N N
`> 2 `> 2
N N
`> 2
`> 2
w L N > εL N
εN
N N
`> 2 `> 2
hLN ≤ εLN
N N
`> 2 `> 2
number of vertical rectangles from OP Tlong among all strips, and we call it to
be the cheapest εN -width vertical strip (See Figure 4.8a). Clearly the cheapest
εN -width vertical strip intersects at most a ε+2εεLsmall ≤ O(εL ) fraction of the
rectangles in the vertical part of L-region, so we can remove all such vertical
rectangles intersected by the cheapest εN -width vertical strip at a small loss
of profit. Similarly, we remove the horizontal rectangles intersected by the
105 4.4 Cardinality case without rotations
cheapest εN -height horizontal strip in the boundary L-region and push the
remaining rectangles in the L region to the bottom and left. We now pack the
horizontal container for OP Tshort ∩ OP TT above the horizontal part of L region
and the vertical container for OP Tshort ∩ OP TT to the right of the vertical part
of the L-region (See Figure 4.8b).
In the other case (wL > εL , hL ≤ εL and w(V1−2εL ) ≤ 12 − 2εlarge N ), we can
again remove the cheapest εN -width vertical strip in the boundary L-region
and pack the vertical container for OP Tshort ∩ OP TT there (See Figure 4.9a).
Now we show how to pack horizontal items from OP Tshort ∩ OP TT . In the
packing of the boundary L-region, we can assume that the vertical rectangles
are sorted non-increasingly by height from left to right and pushed upwards
until they touch the top boundary. Then, since 1
w(V 1−2εL
) ≤ 2
− 2ε large N
and (hL ≤ εL ), the region 2 − 2εlarge N, N ×[εL N, 2εL N ] will be completely
1
empty and thus we will have enough space to pack the horizontal container for
OP Tshort ∩ OP TT on top of the horizontal part of the L-region (See Figure
4.9b). The last case, when wL ≤ εL , is analogous. Thus we have a packing in
boundary L-region of width at most (wL +εL )N and height at most (hL +εL )N
with total profit at least 3(1−O(ε))
4
(|OP Tlong |)+|OP Tshort ∩OP TT |, implying that
3(1 − O(ε))
|OP TL&C | ≥ (|OP Tlong |) + |OP Tshort ∩ OP TT | (4.8)
4
Packing of subset of rectangles from OP Tshort \ OP TT into the remain-
ing region.
Note that after packing rectangles of cardinality at least 3(1−O(ε))4
|OP Tlong | +
|OP Tshort ∩OP TT | in the boundary L-region, the remaining rectangular region,
let us call it to be Rcontainer , of width (1 − wL − εL )N and height (1 − hL − εL )N
is completely empty. Now we will show the existence of a packing of some
rectangles from OP Tshort \ OP TT in the remaining space of the packing (even
using some space from the L-boundary region). Let (OP Tshort \ OP TT )hor :=
(OP Tshort \OP TT )∩Rhor and (OP Tshort \OP TT )ver := (OP Tshort \OP TT )∩Rver .
Let us assume without loss of generality that vertical rectangles are shifted as
much as possible to the left and top of the knapsack and horizontal are pushed
as much as possible to the right and bottom. We divide the analysis in three
subcases depending on a(OP Tshort \ OP TT ).
− Subcase (i). If a(OP Tshort \ OP TT ) ≤ 53 N 2 , from inequalities (4.2), (4.3),
(4.4), (4.8) and Lemma 69 we get
127
|OP TL&C | ≥ − O(εL ) |OP T | (4.9)
216
106 4.4 Cardinality case without rotations
packing using Steinberg’s theorem. Note that this rectangular region has area
at least N 2 (1 − wL − 2εL )(1 − hL − 2εL ). Thus by using Steinberg’s the-
orem, we can pack either rectangles from (OP Tshort \ OP TT )hor (by sorting
them non-decreasingly by area and picking them iteratively) having total area
2
at least min{a((OP Tshort \ OP TT )hor ), N (1−wL −2εL2 )(1−hL −2εL ) − εsmall } or rect-
angles from (OP Tshort \ OP TT )ver with total area at least min{a((OP Tshort \
2
OP TT )ver ), N (1−wL −2εL2 )(1−hL −2εL ) − εsmall }. We claim that if we keep the best
of the two packings, we can always pack at least 48 − O(εL ) |OP Tshort \
7
2
OP TT |. Note that it is sufficient to consider, N (1−wL −O(εL2))(1−hL −O(εL )) <
min{a((OP Tshort \ OP TT )hor ), a((OP Tshort \ OP TT )ver )}, as otherwise, we can
pack even more rectangles from OP Tshort \ OP TT than the claimed fraction. In
this case, we pack at least
N2 (1−wL −O(εL ))(1−hL −O(εL )) (1−wL −O(εL ))(1−hL −O(εL ))
2 2a((OP Tshort \OP TT )hor )
|(OP Tshort\ OP TT )hor | + 2a((OP Tshort \OP TT )ver )
|(OP Tshort \ OP TT )ver |
≥ N2
2 (1−wL −O(εL ))(1−hL −O(εL ))
2a(OP Tshort \OP TT )
|OP T short \ OP T T |
N
wL N > 2
γN ( 12 − 2εlarge)N
N/2 A Region 1
λN ψN
(λ − 12 )N B
Region 2
N
C hLN ≤ 2
Let us define some parameters from the current packing to simplify the calcu-
lations. Let λN be the height of the tallest vertical rectangle in the packing
that touches the vertical line x = 2 − 2εlarge N and γN be the total width
1
εN . That way we will be able to pack rectangles from (OP Tshort \OP TT )ver into
the box defined by Region 1 and rectangles from (OP Tshort \ OP TT )hor into the
boxes defined inside Region 2 using almost completely its free space. In order
to create the boxes inside Region 2 we first create a monotone chain by doing
the following: Let (x1 , y1 ) = (γN, hL ). Starting from position (x1 , y1 ), we draw
an horizontal line of length εL N and then a vertical line from bottom to top
until it touches a vertical rectangle, reaching position (x2 , y2 ). From (x2 , y2 )
we start again the same procedure and iterate until we reach the vertical line
x = 21 − 2εlarge N or the horizontal line y = (1 − ψ)N . Notice that the
area above the monotone chain and below y = (1 − ψ)N that is not occupied
by vertical rectangles, is at most i εL N (yi+1 − yi ) ≤ εL N 2 . The number of
P
Note that from each box B 0 of height h(≥ εN ), we can remove the cheapest εh-
horizontal strip and use resource augmentation to get a container based packing
with nearly the same profit as B 0 . Thus by performing a similar analysis to
the one done in Subcase (iii a), and using the fact that a(OP Tshort \ OP TT ) ≤
N 2 − ( α2 + (λ − 12 ) 12 + β2 )N 2 ≤ N 2 − N 2 ( w2L + (λ − 12 ) 12 + h2L ), we can minimize
the whole expression over the domain { w2L + (λ − 12 ) 21 + h2L ≤ 25 , 12 ≤ wL ≤
, ≤ λ ≤ 1, 0 ≤ β ≤ 21 } and prove that this solution packs at least
4 1
5 2
3 − O(εL )
5
|OP Tlong |+|OP Tshort ∩OP TT |+ − O(εL ) |OP Tshort \OP TT |.
4 36
Thus, using the above inequality along with (4.2), (4.3), (4.4) and Lemma 69,
we get
325
|OP TL&C | ≥ − O(εL ) |OP T | (4.12)
558
Finally, if ψ = λ < 7+10(w L +λ−hL )
40−20wL
, we will not get equal area horizontal and
vertical boxes for packing of items in OP Tshort \ OP TT . In this case we change
the width of the box inside Region 1 to be wL0 < N (1 − wL ) fixed in such a
way that the area of this box is equal to the bound we have for the area of
the boxes in Region 2, i.e., N 2 (1 − λ − hL ) − ( 13
20
− w2L − h2L − λ2 + O(εL ))N 2 .
Performing the same analysis as before, it can be shown that in this case we
pack at least
!
13
(1 − λ − hL )N 2 − ( 20 − w2L − h2L − λ2 )N 2
− O(εL ) |OP Tshort \ OP TT |,
2a(OP Tshort \ OP TT )
( 14 + w2L −εL −2εlarge )N 2 . Thus a(OP Tshort \OP TT ) < ( 34 − w2L +εL +2εlarge )N 2 .
Now consider the vertical rectangles in the boundary L-region sorted non-
increasingly by width and pick them iteratively until their total width crosses
( w2L +3εL +2εlarge )N . Remove these rectangles and push the remaining vertical
rectangles in the L-region to the left as much as possible. This modified L-
region will have profit at least ( 12 − O(εL ))|OP Tlong |. Now we can put εN -strip
for the vertical items from OP Tshort ∩OP TT next to the vertical part of L-region.
110 4.4 Cardinality case without rotations
wL N
w(V1−2εL )
wL
( 12 − 2εlarge)N < 2 N
N N
`> 2 `> 2
Now we consider the last case when wL < εL and h(H1−2εL ) > 21 − 2εlarge N .
Note that as we assumed the cheapest subring was the top subring, after re-
moving it we might be left with only |OP Tlong ∩ Rhor |/2 profit in the horizontal
part of L-region. So, further removal of items from the horizontal part might
not give us a good solution. Thus we show an alternate good packing. We
restart with the ring packing and delete the cheapest vertical subring instead
of the cheapest subring (i.e., the top subring) and create a new boundary L-
region. Here, consider the horizontal rectangles in the boundary L-region in
non-increasing order of height and take them until their total height crosses
( β1 +β
2
2
+ εsmall + ε)N . Remove these rectangles and push the remaining hori-
zontal rectangles to the bottom as much as possible. Then, following similar
arguments as in case 2B, we will obtain the same bounds as in inequality (4.15).
In summary, from all the cases (see Figure 4.7 for the overview of the case
analysis) the profit of the obtained solution is at least
325
− O(εL ) |OP T |.
558
4.5 Conclusions
In this chapter, we presented techniques for 2DGK that are not entirely based
on containers. By leveraging a combination of container packings and L-
packings, we obtained the first algorithm that break the barrier of 2 for the
approximation factor of this problem. We obtained an approximation factor
of 17/9 + ε < 1.89 for the weighted case, and 325
558
+ ε < 1.72 in the cardinality
case.
Further improvements could come from the study of generalizations of L-
packings. For example, a PTAS for ring-packing instances arising by shifting of
long items would lead to an improved approximation factor. A PTAS for O(1)
simultaneous L-packings would also be an interesting development, and might
be a stepping stone for the long-standing problem of finding a PTAS for 2DGK,
which remains open even in the cardinality case, and even if pseudo-polynomial
time is allowed instead of polynomial time.
112 4.5 Conclusions
Chapter 5
113
114 5.1 Weighted Case
2
moreover, a(R \ {m}) ≤ (1 − (1 − ε)2 )N 2 = (2ε − ε2 )N 2 ≤ 2(1+ε)
N
, as ε < 1/6;
thus, by possibly rotating each element so that the height is smaller than ε,
by Theorem 3 all the items in R \ {m} can be packed in a N × 1+ε N
bin; then,
by Lemma 14, there is a container packing for a subset of R \ {m} with Oε (1)
containers that fits in the N ×N bin and has profit at least (1−O(ε))p(R\{m})
Consider now the packing of R. Clearly, the region [εN, (1−ε)N ]2 is entirely
contained within the boundaries of the massive item m. Partition the region
with x-coordinate between εN and (1 − ε)N in k = 1/(3ε) strips of width
3ε(1 − 2ε)N ≥ 2εN and height N , let them be S1 , . . . , Sk ; let R(Si ) be the set
of items in R such that their left or right edge (or both) are contained in the
interior of strip Si . Since each item belongs to at most two of these sets, there
exists i such that p(R(Si )) ≤ 6εp(R).
Symmetrically, we define k horizontal strips T1 , . . . , Tk , obtaining an index j
such that p(R(Tj )) ≤ 6εp(R). Thus, no item in R := R \ (R(Si ) ∪ R(Tj )) has
a side contained in the interior of Si or Tj , and p(R) ≥ (1 − 12ε)p(R). Let
MV be the set of items in R \ {m} that overlap Tj , and let MH be the set of
items in R \ {m} that overlap Si . Clearly, the items in MH can be packed in a
horizontal container with width N and height N − h(m), and the items in MV
can be packed in a vertical container of width N − w(m) and height N .
Let H be the set of items of R \ MH that are completely above the massive
item m or completely below it; symmetrically, let V be the set of items of
R \ MV that are completely to the left or completely to the right of m. We
will now show that there is a container packing for MH ∪ V ∪ {m}. Since
all the elements overlapping Tj have been removed, V can be packed in a bin
of size (N − w(m)) × (1 − 2ε)N (see Figure 5.1). Since (1 − 2ε)N · (1 + ε) <
(1−ε)N ≤ h(m), Lemma 14 implies that there is a container packing of a subset
of V with profit at least (1 − O(ε))p(V ) in a bin of size (N − w(m)) × h(m)
and using Oε (1) containers; thus, by adding a horizontal container of the same
size as m and a horizontal container of size N × (N − h(m)), we obtain a
container packing for MH ∪ V ∪ {m} with Oε (1) containers and profit at least
(1 − O(ε))p(MH ∪ V ∪ {m}). Symmetrically, there is a container packing for a
subset of MV ∪ H ∪ {m} with profit at least (1 − O(ε))p(MV ∪ H ∪ {m}) and
Oε (1) containers.
Let RM AX be the set of maximum profit among the sets R \ {m}, MH ∪ V ∪
{m} and MV ∪ H ∪ {m}. By the discussion above, there is a container packing
for R0 ⊆ RM AX with Oε (1) containers and profit at least (1 − O(ε))p(RM AX ).
Since each element in R is contained in at least two of the above three sets, it
follows that:
116 5.1 Weighted Case
wi
H
H
MH Lef t(i) Right(i)
V V
(a) Massive item case. Items inter- (b) Bottom(i), T op(i), Lef t(i), Right(i)
secting strips MH and MV (hatched are represented by vertical, horizon-
rectangles) cross them completely. tal, north east and north west stripes
respectively.
Figure 5.1
0 2
p(R ) ≥ (1 − O(ε))p(RM AX ) ≥ (1 − O(ε)) p(R)
3
2
≥ − O(ε) p(R)
3
Proof. Let εs = ε/2. We will partition M into two sets M1 , M \ M1 and show
that both these sets can be packed into N × (1 − εs )N bin. If an item i is
embedded in position (xi , yi ), we define x0i := xi + w(i), yi0 := yi + h(i).
In a packing of a set of items M , for item i we define Lef t(i) := {k ∈ M :
x0k ≤ xi }, Right(i) := {k ∈ M : xk ≥ x0i }, T op(i) := {k ∈ M : yk ≥ yi0 },
Bottom(i) := {k ∈ M : yk0 ≤ yi }, i.e., the set of items that lie completely
on left, right, top and bottom of i respectively. Now consider four strips
ST,3εs , SB,εs , SL,εs , SR,εs (see Figure 5.2).
Case 1. DB,εs ∩DT,3εs = ∅, i.e., no item intersecting SB,εs intersects ST,3εs . De-
fine M1 := ET,3εs . As these items in M1 do not intersect SB,εs , M1 can be packed
into a (N, N (1−εs )) bin. For the remaining items, pack M \(M1 ∪CL,εs ∪CR,εs )
as it is. Now rotate CL,εs and CR,εs and pack on top of M \ (M1 ∪ CL,εs ∪ CR,εs )
into two strips of height εs N and width N . This packing will have total height
≤ (1 − 3εs + 2εs )N ≤ (1 − εs )N .
Case 2. DB,εs ∩ DT,3εs 6= ∅, i.e., there is some item intersecting SB,εs that also
crosses ST,3εs . Now, there are three subcases:
Case 2A. There exists an item i that does neither intersect SL,εs nor SR,εs .
Then item i partitions the items in M \ (CT,3εs ∪ CB,εs ∪ {i}) into two sets:
Lef t(i) and Right(i). Without loss of generality, assume xi ≤ 1/2. Then
remove Right(i), i, CT,3εs and CB,εs from the packing. Now rotate CT,3εs and
118 5.1 Weighted Case
εsN εsN
3εsN
ST,3εs
i i
SB,εs εsN
SL,εs SR,εs
(a) Case 1: (b) Case 2A: i does not (c) Case 2B: i intersects
DB,εs ∩ DT,3εs = ∅. intersect SL,εs or SR,εs . both SL,εs and SR,εs .
i i i
(d) Case 2C: i ∈ DL,εs (e) Case 2C: i ∈ DL,εs (f) Case 2C:
and x0i ≤ N/2. and x0i > N/2. i ∈ CL,εs .
CB,εs to pack right of Lef t(i). Define this set M \ (Right(i) ∪ {i}) to be M1 .
Clearly packing of M1 takes height N and width xi +4εs N ≤ ( 21 +4εs )N ≤ (1−
εs )N as εs ≤ 101
. As the item i does not intersect the strip SL,εs , (Right(i)∪{i})
can be packed into height N and width (1 − εs )N .
Case 2B. There exists an item i that intersects both SL,εs and SR,εs . Consider
M1 to be M \ (CL,εs ∪ CR,εs ∪ T op(i)). As there is no massive item, M1 is
packed in height (1 − εs )N and width N . Now, pack T op(i) and then rotate
CL,εs and CR,εs to pack on top of it. These items can be packed into height
(1 − yi0 + 2εs )N ≤ 5εs N ≤ (1 − εs )N as εs ≤ 1/10.
Case 2C. If an item i intersects both SB,εs and ST,3εs , then the item i intersects
exactly one of SL,εs and SR,εs . Consider the set of items in DB,εs ∩ DT,3εs .
First, consider the case when the set DB,εs ∩ DT,3εs contains an item i ∈ DL,εs
(similarly one can consider i ∈ DR,εs ). Now if x0i ≤ N/2, take M1 := Right(i).
Then, we can rotate Right(i) and pack into height (1 − εs )N and width N . On
119 5.2 Unweighted case
αN βN αN
ST,γ γN
SB,δ
δN
the other hand, pack M \{M1 ∪CT,3εs ∪CB,εs } as it is. Then rotate CT,3εs ∪CB,εs
and pack on its side. Total width ≤ (1/2 + 3εs + εs )N ≤ (1 − εs )N as εs ≤ 1/6.
Otherwise if x0i > N/2 take M1 := Lef t(i) ∪ i. Now, consider packing of
M \ {M1 ∪ CT,3εs ∪ CB,εs }, rotate CT,3εs ∪ CB,εs and pack on its left. Total
width ≤ (1/2 + 4εs )N ≤ (1 − εs )N as εs ≤ 1/10.
Otherwise, no items in SB,εs ∩ ST,3εs are in DL,εs ∪ DR,εs . So let us assume
that i ∈ CL,εs (similarly one can consider i ∈ CR,εs ), then we take M1 =
ET,3εs \ (CL,εs ∪ CR,εs ). Then we can rotate CL,εs and CR,εs and pack them on
top of M \ (M1 ∪ CL,εs ∪ CR,εs ) as in Case 1.
Proof. After removal of T , we can get a container based packing for almost all
items in F as discussed in Lemma 54 in Section 4.3.
Now the main technical contribution of this section is the following Resource
Contraction Lemma.
Lemma 76. (Resource Contraction Lemma) Suppose that there exists a feasible
packing of a set of rectangles M in a N × N bin, for some ε > 0. Then it is
possible
to packa subset of M with cardinality
at least 23 (1 − O(ε))|M | into a
1 1
N × 1 − ε 2ε +1 N bin (or a 1 − ε 2ε +1 N × N bin), if rotations are allowed.
We defer the proof of the lemma to the end of this section. First, we show
that using Lemma 76 we can prove the following:
Proof. First, we use Lemma 50 such that the total height of all rectangles in T
1 +1 1 +1
is at most ε 2ε 2 N . So we pack them in a horizontal container of height ε 2ε 2 N .
Then using Lemma 76 we show the existence of a packing of (2/3 − O(ε))|F | in
1
N × (1 − ε 2ε +1 )N . Then we can use resource augmentation to get a container
1
ε 2ε +1
packing of (2/3 − O(ε))|F | in the remaining area N × 1 − 2
N.
Lemma 79. Given any constant ε > 0, there exists a value i ∈ [1/2ε] such
that all rectangles having height ∈ ((1 − 2εi )N, (1 − εi+1 )N ] have total profit at
most ε|M |.
121 5.2 Unweighted case
CT,εi+1 rotated
CB,εi+1 rotated
εi+1
εi
N − w(X) 2|X|/3
(a) (b)
Figure 5.4. Case A for cardinality 2DK with rotations. Dark gray rectangles
are X, light gray rectangles are Z, gray (and hatched) rectangles are Y , hatched
rectangles are CT,εi+1 and CB,εi+1 . Figure (a): original packing in N ×N , Figure
(b): modified packing leaving space for resource contraction on the right.
Proof. Let Ki be the set of rectangles with height ∈ ((1 − 2εi )N, (1 − εi+1 )N ]
for i ∈ [1/2ε]. Clearly a rectangle can belong to at most two such sets. Thus,
cheapest set among these 1/2ε sets has cardinality at most ε|M |.
Lemma 80. Given any constant εs ≥ εsmall , either a(EL,εs ∪ER,εs ) ≤ (1+8εs ) 2
2
N
or a(ET,εs ∪ EB,εs ) ≤ (1+8ε
2
s)
N 2.
Proof. Let us define H := EL,εs ∪ ER,εs and V := ET,εs ∪ EB,εs . Note that,
a(V ) + a(H) ≤ a(V ∪ H) + a(V ∩ H). Now, a(V ∪ H) ≤ N 2 as all rectangles
were packed into a N × N knapsack. On the other hand, except possibly four
rectangles (the ones that contain at least one of the points (εs N, εs N ), ((1 −
εs )N, εs N ), (εs N, (1 − εs )N ), ((1 − εs )N, (1 − εs )N )) all other rectangles in
(V ∩ H) lie entirely within the four εs N strips. Thus a(V ∩ H) ≤ 4εs N 2 +
4εsmall N 2 ≤ 8εs N 2 , as εsmall ≤ εs . Thus, min{a(V ), a(H)} ≤ a(V ∪H)+a(V
2
∩H)
≤
N .
(1+8εs ) 2
2
Lemma 81. Given a constant 0 < εa < 1/2 and a set of rectangles M :=
{1, . . . , k} with w(i) ≥ εlarge N, h(i) ≤ εsmall N for all i ∈ M , if a(M ) ≤ (1/2 +
εa )N 2 , then a subset of M with cardinality (1 − 2εs − 2εa )|M | can be packed
into a N × (1 − εs )N knapsack.
Proof. Without loss of generality, assume the rectangles in M are given in
nondecreasing order according to their area. Note that a(i) ≤ εs N 2 for any
122 5.2 Unweighted case
(1 − εs )N bin. As we considered
rectangles
in the order of nondecreasing area,
|S| ( −εs )
1
≥ 12 +ε . Thus, |S| ≥ 1 − (ε1a+ε+εs )
|M | ≥ (1 − 2εa − 2εs )|M |.
|M | ( 2 a) ( 2 a)
From Lemma 79, let V 0 be the set of rectangles having height ∈ [(1 −
2εi )N, (1−εi+1 )N ] such that |V 0 | ≤ ε|M |. We remove the rectangles in V 0 . Now
consider strips SL,εi , SR,εi , ST,εi , SB,εi . From Lemma 47, we can always choose
εsmall such that ε1/2ε > εsmall . Then as εi ≥ εsmall , from Lemma 80, without
i)
loss of generality assume that a(ET,εi ∪ EB,εi ) ≤ (1+8ε 2
a(M ). Let X be the set
of rectangles that intersect both ST,εi and SB,εi and Y := {ET,εi ∪ EB,εi } \ X.
Define Z := M \ {X ∪ Y ∪ V } to be the rest of the rectangles. Let us define
w(X) = i∈X w(i). Now there are two cases.
P
Case A. w(X) ≥ 12εi+1 N . From Lemma 79, all rectangles in X intersects both
ST,εi+1 and SB,εi+1 . So, removal of all rectangles in X, CT,εi+1 and CB,εi+1 creates
many empty strips of height N and total width of w(X). Now if in a packing,
there are k strips of height (or width) N and width (or height) w1 , w2 , . . . , wk ,
then one can push the rectangles in the packing to the left or right and create an
empty strip of width ki=1 wi . Thus we can push all the remaining rectangles in
P
Y ∪Z to the left so that they fit into a strip of width N −w(X). Then we rotate
CT,εi+1 and CB,εi+1 and pack them in two strips, each of width εi+1 N . Note
that w(i) ≤ εi+1 N for all i ∈ X. Now take rectangles in X by nondecreasing
width, till total width is in [w(X) − 4εi+1 N, w(X) − 3εi+1 N ] and pack them
in the remaining area (see Figure 5.4). The cardinality of this set is at least
(w(X)−4εi+1 N )
w(X)
|X| ≥ 23 |X|. Hence, at least 23 |X| + |Y | + |Z| ≥ 23 (|X| + |Y | + |Z|)
rectangles are packed into N × (1 − εi+1 )N .
Case B. w(X) < 12εi+1 N . Without loss of generality, assume |EB,εi \ X| ≥
|Y |/2 ≥ |ET,εi \ X|. Then remove ET,εi . Pack X on top of M \ ET,εi as
12εi+1 ≤ εi − εi+1 (see Figure 5.5). This gives a packing of |X| + |Z| + |Y2 | . On
i)
the other hand, as a(X ∪ Y ) = a(ET,εi ∪ EB,εi ) ≤ (1+8ε 2
a(M ), from Lemma 81,
we claim that (1 − 2εi+1 − 8εi )(|X ∪ Y |) can be packed into N × (1 − εi+1 )N
bin.
Thus we can always pack a set of rectangles with cardinality at least
max{(1 − 10εi )(|X| + |Y |), |X| + |Z| + |Y2 | } ≥ 23 (1 − 10εi )(1 − ε)|M |. This
concludes the proof of Lemma 76.
Now we can obtain a PTAS for container packing using Theorem 12. This
completes the proof of Theorem 71 for the cardinality case.
123 5.3 Conclusions
εi+1
X rotated
εi
(a) (b)
Figure 5.5. Case B for cardinality 2DK with rotations. Dark gray rectangles are
X, light gray rectangles are Z, gray (and hatched) rectangles are Y , hatched
rectangles are CT,εi+1 and CT,εi+1 . Figure (a): original packing, Figure (b):
modified packing leaving space for resource contraction on the top.
5.3 Conclusions
In this chapter, we exploited the additional flexibility given by the freedom to
rotate the rectangles to design improved approximation algorithms for 2DGKR.
While L-packings do not seem to be useful for this variation of the problem,
rotating the rectangles allows us to make use of the resource contraction tech-
nique. Thus, we proved that simple container packings can obtain an approxi-
mation factor of 3/2 + ε in general, and 4/3 + ε for the cardinality case.
Like for 2DGK, a PTAS is in the realm of possibilities, making this problem
a still interesting target for future research.
124 5.3 Conclusions
Chapter 6
de (T ) := i∈T 0 ∩Te di of selected tasks using that edge is upper bounded by the
0
P
125
126 6.1 Related work
1
best known hardness for EDP is Ω (log n) 2 −ε under the assumption that
NP√ 6⊆ ZP T IM E npoly log n ; very recently, Chuzhoy et al. [2017] proved a
Lemma 82. Suppose that there is an α-approximation for the special case
when all the tasks are small, and a β-approximation for the case when all the
tasks are large, for some α, β ≥ 1. Then there exists a α + β approximation
algorithm for the general case.
Proof. Consider an instance of bagUFP with set of tasks T . Suppose that T =
TS ∪˙ TL , where TS and TL are the small and large tasks, respectively. Let OP T
be the optimal solution, and let OP TS = OP T ∩ TS and OP TL = OP T ∩ TL .
We run the α-approximation on TS the β-approximation on TL to obtain the
feasible solutions AP XS and AP XL , respectively; then we output the one with
largest profit, let it be AP X.
Clearly, p(AP XS ) ≥ p(OP TS )/α and p(AP XL ) ≥ p(OP TL )/β, which implies:
αp(AP XS ) + βp(AP XL )
p(AP X) = max {p(AP XS ), p(AP XL )} ≥
α+β
p(OP TS ) + p(OP TL ) p(OP T )
≥ =
α+β α+β
128 6.2 Basic notions
bi
i }d i
si ti
Figure 6.1. Illustration of the main concept of a bagUFP instance. Each task
i is represented as a rectangle, where the starting and ending x-coordinate
represent si and ti , while the height represents the demand of that task; bi is
the bottleneck capacity of task i. Tasks in the same bag are represented with
the same color.
Many results on this problem (and its variations) are indeed based on par-
titioning the items in the two classes of small and large, although the exact
definition might be different from the one we use here. In fact, when items are
relatively small, LP-based techniques have been applied successfully; but they
would break down on large items. Vice versa, for relatively large items, good
results are typically obtained with Dynamic Programming algorithms. Note
that even if algorithms were found that solve exactly instances with either only
small items or only large items, Lemmsa 82 only guarantees a 2-approximation
overall. Thus, breaking the barrier of 2, if it is possible, would requires funda-
mentally new ideas that allow to handle small and large items simultaneously.
Using the primal-dual technique, for instances of bagUFP entirely composed
of small tasks, Chakaravarthy et al. [2014] proved the following:
Thus, in the following we can focus on instances where all tasks are large.
129 6.2 Basic notions
Figure 6.2. The top-drawn instance corresponding to the tasks in Figure 6.1.
maximize
P
i:Ti ∈T w i xi (LPbagUFP )
s.t.
P
i:e∈Ti d i xi ≤ u e ∀e ∈ E
P
Ti ∈Bj xi ≤ 1 ∀Bj ∈ J
xi ≥ 0 ∀Ti ∈ T
Note that, if the variables are restricted to {0, 1}, this is the exact integer
programming formulation of the problem.
As it was first done by Bonsma et al. [2011], for large tasks we exploit a
connection to the Maximum Weight Independent Set of Rectangles (MWISR)
problem, which is the following problem: given a set of axis-aligned rectangles
in the plane, each with an associated weight, find the maximum weight set of
pairwise non-overlapping rectangles1 . The best known polynomial time approx-
imation for this problem is an O(log n/ log log n)-approximation by Chan and
Har-Peled [2012], although Chalermsook and Chuzhoy [2009] gave a O(log log n)-
approximation for the unweighted (cardinality) case. Moreover, a QPTAS was
given in Adamaszek and Wiese [2013].
For each large task i of a UFP instance, we associate the rectangle Ri with
top-left corner (si , bi ) and bottom-right corner (ti , li ) where li = bi − di . We
call this set of rectangles the top-drawn instance corresponding to Tlarge (see
Figure 6.2 for an illustration of the capacity profile and a top-drawn instance).
Thus, the set of rectangles R = {Ri }i with the weight function wi defines an
MWISR instance, and it is easy to see that a feasible solution for the MWISR
instance corresponds to a feasible subset of task in the UFP instance. Moreover
the following result applies:
1
We say that two rectangles overlap if their interiors have non-empty intersection.
130 6.2 Basic notions
b b b b
b b b b b
b b b b b
b b b b
2
We slightly abuse notation by reusing the symbol Bj to refer either to the bags of tasks
(if we talk about bagUFP) or to the corresponding bags of rectangles of bagMWISR.
131 6.3 A O(log n/ log log n)-approximation for bagUFP
two rectangles Ri , Rj ∈ R.
maximize
P
R ∈R wi yi (LPbagMWISR )
P i
s.t. R ∈R:p∈Ri yi ≤ 1 ∀p ∈ P
P i
Ri ∈Bj yi ≤ 1 ∀ Bj ∈ J
yi ≥ 0 ∀ Ri ∈ R
Let y be the optimal solution and let opt = Ri ∈R wi yi be its value. Clearly,
P
Theorem 85. There is a QPTAS for twUFP under BTWA and assuming that
demands are quasi-polynomially bounded in n.
Figure 6.4. Proof of Lemma 86. The thinnest rectangles (in red) are indepen-
dent, and removing them decreases the maximum clique size.
two undirected graphs G1 and G2 with vertex set R such the edge (Ri , Rj ) is
in G1 if the rectangles Ri and Rj are in the same bag, or if they overlap but
do not cross3 ; and (Ri , Rj ) is in G2 if they cross. Clearly, a set S ⊆ R is an
independent set of rectangles which satisfies the bag constraints if and only if
it is an independent set in both G1 and G2 . We have the following lemma:
3
Observe that if two overlapping rectangles are not crossing, then at least one rectangle
has a vertex that is contained in the interior of the other rectangle.
133 6.3 A O(log n/ log log n)-approximation for bagUFP
6.3.1 Algorithm
For two rectangles Ri and Rj , we write that Ri ⊗Rj if the interior of Ri contains
at least one corner of Rj , or vice versa; that is, Ri ⊗ Rj if Ri and Rj overlap
but do not cross.
For an arbitrary set K ⊆ R and rectangle Ri ∈ R, we define the resistance
η as: X X
η(Ri , K) = yj + yj
Rj ∈K\B(Ri ), Rj ∈K∩B(Ri )\{Ri }
Ri ⊗Rj
That is, η(Ri , K) is the sum of each yj for some Rj ∈ K such that Ri ⊗ Rj , or
Ri and Rj are in the same bag.
The algorithm works as follows. First, a fractional optimal solution y of
LPbagMWISR is computed. Then a permutation Π of R is obtained as follows:
if the first i elements are Πi = {π1 , . . . , πi }, then the (i + 1)th element πi+1 is:
Let ηi = η(πi , R \ Πi−1 ) be the resistance of the ith rectangle. After the
permutation is computed, a candidate set C and an independent set S for G1
are computed with the following process. Initially, C and S are empty. Then,
the members of the permutation are scanned in reverse order: at iteration
k, the rectangle πm−(k−1) is added to set C (initially empty) with probability
y(πm−(k−1) )/τ , where τ > 1 is a constant integer parameter that will be defined
later. If πm−(k−1) is added to C and S ∪ {πm−(k−1) } is an independent set in
G1 , then πm−(k−1) is also added to S.
Finally, by using Lemma 86, the algorithm finds a subset S 0 ⊆ S that is an
independent set in G2 [S] such that p(S 0 ) ≥ p(S)/∆, where ∆ is the maximum
clique size of G2 [S].
6.3.2 Analysis
For a subset H ⊆ R, let us define E(H) = Ri ∈H yi ; moreover, let C(H) =
P
X X X X
Proof. yi yj = yi yj ≤ 4 yi = 4E(H).
(p,i,j)∈C(H) i∈H j:(p,i,j)∈C(H) i∈H
The inequality follows from the feasibility of y and the fact that there are four
corner points for each rectangle.
134 6.3 A O(log n/ log log n)-approximation for bagUFP
Figure 6.5. Three types of rectangles that overlap with the black rectangle,
without creating a crossing intersection. The black rectangle contains all the
4 corners of the red rectangles, and exactly two corners of the blue rectangle.
The green rectangle contains one corner of the black rectangle which, in turn,
contains one corner of the green rerctangle.
Lemma 88. For any i, the resistance of the ith chosen rectangle πi is at most
5.
We first prove: X X X
yk yj ≤ yi yj
Rk ∈K Rj ∈K, (p,i,j)∈C(K)
Rk ⊗Rj
Then, by Lemma 87, the right hand side is at most 4E(H). Note that, for
each pair of distinct rectangles Ri , Rj ∈ K such that Ri ⊗ Rj , the term yi yj
appears in the left hand side exactly twice. Now we prove the above inequality
by showing that the term yi yj appears at least twice in the right hand side. If
we fix any pair Ri , Rj ∈ K, there are three cases (see Figure 6.5):
1. one rectangle, say Ri , contains all the 4 corners of the other: then the
term yi yj appears four times in the right hand side.
135 6.3 A O(log n/ log log n)-approximation for bagUFP
2. one rectangle, say Ri , contains exactly 2 corners of the other: then the
term yi yj appears twice in the right hand side.
3. each rectangle contains exactly one corner of the other: then again the
term yi yj appears twice in the right hand side.
Moreover, because of the constraints of bagMWISR, it follows that:
X X X
yk yj ≤ yk = E(K)
Rk ∈K Rj ∈B(Rk ) Rk ∈K
Since the left hand side of the last inequality is a convex combination of the
elements of the set {η(Rk , K) | Rk ∈ K}, it follows that min {η(Rk , K)} ≤ 5.
Rk ∈K
This concludes the proof, because the algorithm always chooses the rectangle
that minimizes the resistance.
Lemma 89. Setting τ = 10, then E[w(S)] ≥ Opt/20.
Proof. Let j 0 = π(j). Observe that the Rj 0 , is added to the candidate set
C with probability xj 0 /τ . Let K be the set of rectangles Ri that were already
considered and such that Rj 0 ⊗Ri or Ri is in the same bag as Rj 0 . Clearly, E(K)
equals the resistance ηj of Rj 0 in the moment it is added to the permutation.
Thus:
Y yi X yi E(K) 1
Pr[Rj 0 ∈ I | Rj 0 ∈ C] = 1− ≥1− =1− ≥
R ∈K
τ R ∈K
τ τ 2
i i
Since |P| = O(n2 ) and ∆ = maxp∈P depth(p, I), by the union bound it follows
that Pr[∆ > t] = O((e/t)t n2 ), which is at most 1/n for t = Θ(log n/ log log n).
log n
Lemma 91. There is an expected O -approximation for bagMWISR.
log log n
" # "X #
X 1 log log n log log n
E wi ≥ 1− Ω E wi ≥Ω Opt
Ri ∈S 0
n log n R ∈S
log n
i
c(x) := c(bxc,bxc+1) .
Let Qcorner be the set of corner points of all the rectangles in RM . Let
Rcorner be the set of all rectangles in R \ Rbag that intersects with at least one
of the points in Qcorner .
The result follows by summing up this inequality with the analogous one
for the top-right, bottom-left and bottom-right corners.
Figure 6.6. The black rectangle with gray background is in RM . The blue ones
are top-intersecting; the yellow one is left-intersecting; the red one is right-
intersecting. Note that a rectangle could simultaneously be left-intersecting to
a rectangle and right-intersecting to another one.
1. li > bj
139 6.4 A O(1)-approximation for the unweighted case
Figure 6.7. Illustration of some of the concepts for the O(1)-approximation for
unweighted bagUFP. The green curve is the capacity profile, and the rectan-
gles are part of a top-drawn instance of bagUFP. Black rectangles with gray
background are in the initial maximal feasible solution RM , while all the other
rectangles are in RT (for simplicity, in this picture there are no rectangles in
Rbag and Rcorner , as well as in RL and RR ). Red rectangles are in Rpoint
top , while
the remaining blue rectangles are in Rtop .
3. y = bj
Let Rpoint
top be the subset of rectangles in RT containing at least one point
in QT , and let Rtop = RT \ Rpoint
top . We now bound the total contribution of
Rtop to the profit of the LP solution.
point
Proof. Note that for any Rj ∈ RM , there are at most two points in QT cor-
responding to the projection of the bottom corner points (sj , lj ), (tj , lj ).The
result follow by a similar argument as in the proof of Lemma 94.
Next we show that the bagMWISR for Rtop can be reduced to an indepen-
dent set of intervals problem with bag constraints.
• R ∈ RM ;
• the coordinates of one of the two bottom corners of R, say (xR , yR ), satisfy
sj < xR < tj and yR > bj .
• yP > bj and lR0 ≤ bj : then for some x ∈ {sR0 , tR0 } the corner (x, lR0 ) of
R0 is contained in Rj and so Rj ∈ Rcorner , which is a contradiction;
• yP > bj and lR0 > bj : then R0 satisfies the above conditions, and the
algorithm continues by setting R ← R0 and going to the next step.
Note that the y-coordinate of the top edge of R is strictly smaller at each
iteration, so a contradiction must eventually be found.
points QL (as we did with the set of points QT ). First we define the mapping
from one point to another as:
minsi (si , y) if ∃Ri ∈ RM : si ≥ x and li ≤ y ≤ bi
and c(x0 ) ≥ y for all x < x0 ≤ si ,
f (x, y) = minx0 f (x0 , c(x0 )) if no such Ri exists and if ∃x0 > x:
c(x0 ) < y and c(x00 ) ≥ y for all x < x00 < x0
⊥ otherwise
Proof. Note that for any rectangle Rj ∈ RM , there is at most one point in QL ,
which is the point we obtain by applying function f to its top-right corner point.
The result follows by a similar argument as in the proof of Lemma 94.
Once again, we can reduce the bagMWISR problem for Rleft = RL \ Rpoint left
to the maximum independent set of intervals problem with bag constraints.
Let uM AX := maxe∈E ue be the maximum capacity.
We map each rectangle Ri ∈ Rleft to the interval [uM AX ·j +li , uM AX ·j +bi ],
where j is defined by: sj = minRM ∈RM {sM : Ri is left-intersecting to RM }; that
is, Rj is the leftmost starting rectangle in RM to which Ri is left-intersecting.
142 6.4 A O(1)-approximation for the unweighted case
Lemma 99. Let Ri , Ri0 ∈ Rleft . Then Ri and Ri0 overlap if and only if the
segments they are mapped to overlap.
Thus, the only case left is that r ≥ tM . We will show that a contradiction
can be obtained with an argument that is similar, in spirit, to the proof
of Lemma 97.
We call a point (x, y) bad for Ri0 if it satisfies the following conditions:
143 6.4 A O(1)-approximation for the unweighted case
1) tM ≤ x < sM 0
2) y ≥ y
3) (x, y) is the top-right corner of a rectangle Rj ∈ RM
Note that the top-right corner of RM is bad for Ri0 . If (x, y) is a bad
point, then it is easy to see that f (x, y) = (x0 , y 0 ) for some point (x0 , y 0 )
that satisfies the above conditions (1) and (2), and that lies on the left
edge of a rectangle Rj ∈ RM ; in fact, since c(x) ≥ y ∀x ∈ [tM , sM 0 ],
by the definition of f (x, y) we are guaranteed that we will find such a
rectangle). If Rj = RM 0 , then (x0 , y 0 ) ∈ QL , and since (x0 , y 0 ) ∈ Ri0 this
implies that Ri0 ∈ Rpoints
left , which is a contradiction. But if Rj 6= RM 0 , then
the top-right corner of Rj , say (x00 , y 00 ) is bad for Ri0 and x00 > x. Thus,
by repeating this process, a contradiction must eventually be found.
In a symmetric fashion, we can define the set of point QR and the corre-
sponding sets of rectangles Rpointsright and Rright , and the analogues of lemmas 98
and 99 apply.
In our algorithm, we take R0 ∈ Rtop , Rleft , Rright and compute the 2-
approximate solution APX(R0 ) for each subproblem. Then we output the
maximum sized solution out of RM , APX(Rtop ), APX(Rleft ) and APX(Rright ),
which we call APX.
We want to bound the cardinality of our solution APX in comparison with
the optimal fractional solution to LPbagMWISR . By Lemma 95 the union of the
sets Rbag , Rpoints , Rtop , Rleft and Rright equals R.
Let Rpoints := Rcorner ∪ Rpoints
top ∪ Rpoints
left right . We have:
∪ Rpoints
Lemma 100. For any feasible solution y of LPbagMWISR , the fractional profit
of the rectangles in Rpoints is upper bounded by 8 · |RM |.
Proof. It directly follows from lemmas 94, 96 and 98.
Lemma 101. For any feasible solution y to LPbagMWISR and any set R0 ∈
{Rtop , Rleft , Rright } it holds that Ti ∈R0 yi ≤ 2 · APX(R0 ).
P
Proof. We know that the bagMWISR instance for R0 ∈ {Rtop , Rleft ,Rright }
is equivalent to the maximum set of independent intervals problem with bag
constraints. Let y 0 be the optimal fractional LP solution for R0 . Since y
is a feasible LP solution for R0 , Ti ∈R0 yi . By
0
Theorem 4.2
P P
Ti ∈Rtop yi ≤
of Bar-Noy, Guha, Naor and Schieber [2001], we have that Ti ∈R0 yi0 ≤ 2 ·
P
|APX(R0 )|.
144 6.5 Conclusions
6.5 Conclusions
In this chapter, we obtained improved approximation algorithms for the bagUFP
problem. It is an interesting open problem to decide if a constant approxima-
tion algorithm is possible for the general case of bagUFP, as we proved for
the cardinality case. Moreover, to the best of our knowledge, no explicit lower
bound is known for this problem, which is another interesting direction in the
attempt to fully understand the approximability of this problem.
Conclusions
145
146 6.5 Conclusions
Bibliography
Abed, F., Chalermsook, P., Correa, J., Karrenbauer, A., Pérez-Lantero, P.,
Soto, J. A. and Wiese, A. [2015]. On Guillotine Cutting Sequences, in
N. Garg, K. Jansen, A. Rao and J. D. P. Rolim (eds), Approximation, Ran-
domization, and Combinatorial Optimization. Algorithms and Techniques
(APPROX/RANDOM 2015), Vol. 40 of Leibniz International Proceedings
in Informatics (LIPIcs), Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik,
Dagstuhl, Germany, pp. 1–19.
URL: http://drops.dagstuhl.de/opus/volltexte/2015/5291
Agarwal, P. K., Van Kreveld, M. and Suri, S. [1998]. Label placement by max-
imum independent set in rectangles, Computational Geometry 11(3-4): 209–
218.
147
148 Bibliography
Bansal, N., Caprara, A., Jansen, K., Prädel, L. and Sviridenko, M. [2009].
A structural lemma in 2-dimensional packing, and its implications on ap-
proximability, International Symposium on Algorithms and Computation,
Springer, pp. 77–86.
Bansal, N., Correa, J. R., Kenyon, C. and Sviridenko, M. [2006]. Bin packing in
multiple dimensions: inapproximability results and approximation schemes,
Mathematics of operations research 31(1): 31–49.
Bansal, N., Han, X., Iwama, K., Sviridenko, M. and Zhang, G. [2007]. Har-
monic algorithm for 3-dimensional strip packing problem, Proceedings of the
eighteenth annual ACM-SIAM Symposium on Discrete algorithms, Society
for Industrial and Applied Mathematics, pp. 1197–1206.
Bansal, N., Lodi, A. and Sviridenko, M. [2005]. A tale of two dimensional bin
packing, Foundations of Computer Science, 2005. FOCS 2005. 46th Annual
IEEE Symposium on, IEEE, pp. 657–666.
149 Bibliography
Bar-Noy, A., Bar-Yehuda, R., Freund, A., Naor, J. and Schieber, B. [2001].
A unified approach to approximating resource allocation and scheduling,
Journal of the ACM (JACM) 48(5): 1069–1090.
Bar-Noy, A., Guha, S., Naor, J. and Schieber, B. [2001]. Approximating the
throughput of multiple machines in real-time scheduling, SIAM J. Comput.
31(2): 331–352.
Batra, J., Garg, N., Kumar, A., Mömke, T. and Wiese, A. [2015]. New
approximation schemes for unsplittable flow on a path, Proceedings of
the Twenty-Sixth Annual ACM-SIAM Symposium on Discrete Algorithms,
SIAM, pp. 47–58.
Chekuri, C., Ene, A. and Korula, N. [2009]. Unsplittable flow in paths and
trees and column-restricted packing integer programs, Approximation, Ran-
domization, and Combinatorial Optimization. Algorithms and Techniques,
Springer, pp. 42–55.
Coffman Jr., E. G., Csirik, J., Galambos, G., Martello, S. and Vigo, D. [2013].
Bin packing approximation algorithms: survey and classification, Handbook
of Combinatorial Optimization, Springer, pp. 455–531.
Cygan, M., Fomin, F. V., Kowalik, L., Lokshtanov, D., Marx, D., Pilipczuk,
M., Pilipczuk, M. and Saurabh, S. [2015]. Parameterized algorithms, Vol. 4,
Springer.
Diedrich, F., Harren, R., Jansen, K., Thöle, R. and Thomas, H. [2008]. Ap-
proximation algorithms for 3d orthogonal knapsack, Journal of Computer
Science and Technology 23(5): 749–762.
152 Bibliography
Elbassioni, K., Garg, N., Gupta, D., Kumar, A., Narula, V. and Pal, A. [2012].
Approximation algorithms for the unsplittable flow problem on paths and
trees, 32nd International Conference on Foundations of Software Technology
and Theoretical Computer Science, p. 267.
Epstein, L. and van Stee, R. [2004a]. Optimal online bounded space multidi-
mensional packing, Proceedings of the fifteenth annual ACM-SIAM sympo-
sium on Discrete algorithms, Society for Industrial and Applied Mathemat-
ics, pp. 214–223.
Epstein, L. and van Stee, R. [2004b]. This side up!, International Workshop on
Approximation and Online Algorithms, Springer, pp. 48–60.
Gálvez, W., Grandoni, F., Heydrich, S., Ingala, S., Khan, A. and Wiese, A.
[2017]. Approximating geometric knapsack via l-packings, Foundations of
Computer Science (FOCS), 2017 IEEE 58th Annual Symposium on, IEEE.
Grandoni, F., Mömke, T., Wiese, A. and Zhou, H. [2017]. To augment or not to
augment: solving unsplittable flow on a path by creating slack, Proceedings of
the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms,
Society for Industrial and Applied Mathematics, pp. 2411–2422.
Gálvez, W., Grandoni, F., Ingala, S. and Khan, A. [2016]. Improved pseudo-
polynomial-time approximation for strip packing, FSTTCS. Proceedings of
36th IARCS Annual Conference on Foundations of Software Technology and
Theoretical Computer Science, Chennai, December 13–15.
Harren, R., Jansen, K., Prädel, L. and van Stee, R. [2014]. A (5/3+ ε)-
approximation for strip packing, Computational Geometry 47(2): 248–267.
Harren, R. and van Stee, R. [2009]. Improved absolute approximation ratios for
two-dimensional packing problems, APPROX-RANDOM, Springer, pp. 177–
189.
Harren, R. and van Stee, R. [2012]. Absolute approximation ratios for packing
rectangles into bins, Journal of Scheduling 15(1): 63–75.
154 Bibliography
Henning, S., Jansen, K., Rau, M. and Schmarje, L. [2017]. Complexity and
inapproximability results for parallel task scheduling and strip packing, arXiv
preprint arXiv:1705.04587 .
Heydrich, S. and Wiese, A. [2017]. Faster approximation schemes for the two-
dimensional knapsack problem, Proceedings of the Twenty-Eighth Annual
ACM-SIAM Symposium on Discrete Algorithms, SIAM, pp. 79–98.
Jansen, K. and van Stee, R. [2005]. On strip packing with rotations, Proceedings
of the thirty-seventh annual ACM symposium on Theory of computing, ACM,
pp. 755–761.
155 Bibliography
Leung, J. Y., Tam, T. W., Wong, C. S., Young, G. H. and Chin, F. Y. [1990].
Packing squares into a square, Journal of Parallel and Distributed Computing
10(3): 271–275.
Li, K. and Cheng, K.-H. [1992]. Heuristic algorithms for on-line packing in
three dimensions, Journal of Algorithms 13(4): 589–605.
Puchinger, J., Raidl, G. R. and Koller, G. [2004]. Solving a real-world glass cut-
ting problem, European Conference on Evolutionary Computation in Com-
binatorial Optimization, Springer, pp. 165–176.
Ranjan, A., Khargonekar, P. and Sahni, S. [2015]. Offline first fit scheduling in
smart grids, IEEE SCC, pp. 758–763.
Seiden, S. S. and van Stee, R. [2002]. New bounds for multi-dimensional pack-
ing, Proceedings of the thirteenth annual ACM-SIAM symposium on Discrete
algorithms, Society for Industrial and Applied Mathematics, pp. 486–495.
Sleator, D. [1980]. A 2.5 times optimal algorithm for packing in two dimensions,
Information Processing Letters 10(1): 37–40.
Tang, S., Huang, Q., Li, X. and Wu, D. [2013]. Smoothing the energy consump-
tion: Peak demand reduction in smart grid, INFOCOM, IEEE, pp. 1133–
1141.