Tight Approximation Algorithms for Geometric Bin Packing with Skewed Items

In Two-dimensional Bin Packing (2BP), we are given n rectangles as input and our goal is to find an axis-aligned nonoverlapping packing of these rectangles into the minimum number of unit square bins. 2BP admits no APTAS and the current best approximation ratio is 1.406 by Bansal and Khan (ACM-SIAM symposium on discrete algorithms (SODA), pp 13–25, 2014. https://doi.org/10.1137/1.9781611973402.2). A well-studied variant of 2BP is Guillotine Two-dimensional Bin Packing (G2BP), where rectangles must be packed in such a way that every rectangle in the packing can be obtained by applying a sequence of end-to-end axis-parallel cuts, also called guillotine cuts. Bansal et al. (Symposium on foundations of computer science (FOCS). IEEE, pp 657–666, 2005. https://doi.org/10.1109/SFCS.2005.10) gave an APTAS for G2BP. Let λ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\lambda $$\end{document} be the smallest constant such that for every set I of items, the number of bins in the optimal solution to G2BP for I is upper bounded by λopt(I)+c\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\lambda {{\,\textrm{opt}\,}}(I) + c$$\end{document}, where opt(I)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\,\textrm{opt}\,}}(I)$$\end{document} is the number of bins in the optimal solution to 2BP for I and c is a constant. It is known that 4/3≤λ≤1.692\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$4/3 \le \lambda \le 1.692$$\end{document}. Bansal and Khan (2014) conjectured that λ=4/3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\lambda = 4/3$$\end{document}. The conjecture, if true, will imply a (4/3+ε)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(4/3+\varepsilon )$$\end{document}-approximation algorithm for 2BP. Given a small constant δ>0\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\delta > 0$$\end{document}, a rectangle is called large if both its height and width are at least δ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\delta $$\end{document}, else it is called skewed. We make progress towards the conjecture by showing that λ=4/3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\lambda = 4/3$$\end{document} when all input rectangles are skewed. We also give an APTAS for 2BP for skewed items, though general 2BP does not admit an APTAS.


Introduction
Two-dimensional Bin Packing (2BP) is a well-studied problem in combinatorial optimization. It finds numerous applications in logistics, databases, and cutting stock. In 2BP, we are given a set of n rectangular items and square bins of side length 1. The i th item is characterized by its width w(i) ∈ (0, 1] and height h(i) ∈ (0, 1]. Our goal is to find an axis-aligned nonoverlapping packing of these items into the minimum number of square bins of side length 1. There are two well-studied variants: (i) where the items cannot be rotated, and (ii) they can be rotated by 90 degrees. As is conventional in bin packing, we focus on asymptotic approximation algorithms. For any optimization problem, the asymptotic approximation ratio (AAR) of algorithm A is defined as lim m→∞ sup I:opt(I)=m (A(I)/opt(I)), where opt(I) is the optimal objective value and A(I) is the objective value of the solution output by algorithm A, respectively, on input I. Intuitively, AAR captures the algorithm's behavior when opt(I) is large. We call a

Related Works
Multidimensional packing problems are fundamental in combinatorial optimization [12]. Vector packing (VP) is another variant of bin packing, where the input is a set of vectors in [0, 1] d and the goal is to partition the vectors into the minimum number of parts (bins) such that in each part, the sum of vectors is at most 1 in every coordinate. The present best approximation algorithm attains an AAR of (0.807 + ln(d + 1)) [6] and there is a matching Ω(ln d)-hardness [37]. Generalized multidimensional packing [33,32] generalizes both geometric and vector packing.
In two-dimensional strip packing (2SP) [14,40], we are given a set of rectangles and a bounded width strip. The goal is to obtain an axis-aligned nonoverlapping packing of all rectangles such that the height of the packing is minimized. The best-known approximation ratio for 2SP is 5/3 + ε [23] and it is NP-hard to obtain better than 3/2-approximation. However, there exist APTASes for the problem [28,26]. In two-dimensional knapsack (2GK) [27], the rectangles have associated profits and our goal is to pack the maximum profit subset into a unit square knapsack. The present best polynomial-time (resp. pseudopolynomial-time) approximation ratio for 2GK is 1.809 [20] (resp. 4/3 [21]). These geometric packing problems have also been studied for d-dimensions (d ≥ 2) [39].
2SP and 2GK are also well-studied under guillotine packing. Seiden and Woeginger [38] gave an APTAS for guillotine 2SP. Khan et al. [29] recently gave a pseudopolynomial-time approximation scheme for guillotine 2GK. Recently, guillotine cuts [35] have received attention due to their connection with the maximum independent set of rectangles (MISR) problem [2]. In MISR, we are given a set of possibly overlapping rectangles and the goal is to find the maximum cardinality set of rectangles so that there is no pairwise overlap. It was noted in [30,1] that for any set of n non-overlapping axis-parallel rectangles, if there is a guillotine cutting sequence separating αn of them, then it implies a 1/α-approximation for MISR.
Skewed instance is an important special case in these problems. In some problems, such as MISR and 2GK, if all items are δ-large then we can solve them exactly in polynomial time. So, the inherent difficulty of these problems lies in skewed instances. For VP, hard instances are again skewed, e.g., Bansal, Eliáš and Khan [6] showed that hard instances for 2-D VP

22:4 Geometric Bin Packing with Skewed Items
(for a class of algorithms called rounding based algorithms) are skewed instances, where one dimension is 1 − ε and the other dimension is ε. Galvez el al. [18] recently studied strip packing when all items are skewed. For skewed instances, they showed (3/2 − ε) hardness of approximation and a matching (3/2 + ε)-approximation algorithm. For 2GK, when the height of each item is at most ε 3 , a (1 − 72ε)-approximation algorithm is known [17].

Our Contributions
We study 2BP for the special case of δ-skewed rectangles, where δ ∈ (0, 1/2] is a constant. First, we make progress towards the conjecture [7] that APoG = 4/3. Even for skewed rectangles, we only knew 4/3 ≤ APoG ≤ T ∞ (≈ 1.691). We resolve the conjecture for skewed rectangles, by giving lower and upper bounds of roughly 4/3 when δ is a small constant.
Specifically, we give an algorithm for 2BP, called skewed4Pack ε , that takes a parameter ε ∈ (0, 1) as input. For a set I of δ-skewed rectangles, we show that when δ and ε are close to 0, skewed4Pack ε (I) outputs a 4-stage packing of I into roughly 4 opt(I)/3 + O(1) bins.
The lower bound of 4/3 on APoG can be extended to skewed items. We formally prove this in Appendix D. Hence, our bounds are tight for skewed items. Our result indicates that to improve the bounds on APoG in the general case, we should focus on δ-large items.
Our other main result is an APTAS for 2BP for skewed items. Formally, we give an algorithm for 2BP, called skewedCPack, and show that for every constant ε ∈ (0, 1), there exists a constant δ ∈ (0, ε) such that the algorithm has an AAR of 1 + ε when all items in the input are δ-skewed rectangles. skewedCPack can be extended to the rotational version of 2BP. The best-known AAR for 2BP is 1 + ln(1.5) + ε. Our result indicates that to improve upon algorithms for 2BP, one should focus on δ-large items.
In Section 3, we describe the skewed4Pack algorithm and prove Theorem 1. In Section 4, we describe the skewedCPack algorithm and prove that it has an AAR of 1 + ε.

Preliminaries
Let [n] := {1, 2, . . . , n}, for n ∈ N. For a rectangle i, its area a(i) := w(i)h(i). For a set I of rectangles, let a(I) := i∈I a(i). An axis-aligned packing of an item i in a bin is specified by a pair (x(i), y(i)), where x(i), y(i) ∈ [0, 1], so that i is placed in the region . A packing of rectangles in a bin is called nonoverlapping iff for any two distinct items i and j, the rectangles (x(i), x(i) + w(i)) × (y(i), y(i) + h(i)) and (x(j), x(j) + w(j)) × (y(j), y(j) + h(j)) are disjoint. Equivalently, items may only intersect at their boundaries.
If we swap the coordinate axes in NFDH, we get the Next-Fit Decreasing Width (NFDW) algorithm. Analogs of the above results hold for NFDW. Slicing Items. We will consider variants of 2BP where some items can be sliced. Formally, slicing a rectangular item i using a horizontal cut is the operation of replacing i by two items i 1 and i 2 such that w(i) = w(i 1 ) = w(i 2 ) and h(i) = h(i 1 ) + h(i 2 ). Slicing using vertical cut is defined analogously. Allowing some items to be sliced may reduce the number of bins required to pack them.
Variants of 2SP where items can be sliced using vertical cuts find applications in resource allocation problems [3,16,19]. Many packing algorithms [28,25,8] solve the sliceable version of the problem as a subroutine.

Guillotinable Packing of Skewed Rectangles
An item is called (δ W , δ H )-skewed iff its width is at most δ W or its height is at most δ H . In this section, we consider the problem of obtaining tight upper and lower bounds on APoG for (δ W , δ H )-skewed items. We will describe the skewed4Pack algorithm and prove Theorem 1.

Packing With Slicing
Before describing skewed4Pack, let us first look at a closely-related variant of this problem, called the sliceable 2D bin packing problem, denoted as S2BP. In this problem, we are given two sets of rectangular items, W and H, where items in W have width more than 1/2, and items in H have height more than 1/2. W is called the set of wide items and H is called the set of tall items. We are allowed to slice items in W using horizontal cuts and slice items in H using vertical cuts, and our task is to pack W ∪ H into the minimum number of bins without rotating the items. We first describe a 4/3-asymptotic-approximation algorithm for S2BP, called greedyPack, that outputs a 2-stage packing. Later, we will use greedyPack to design skewed4Pack.
We assume that the bin is a square of side length 1. Since we can slice items, we allow items in W to have height more than 1 and items in H to have width more than 1. For In the algorithm greedyPack( W , H), we first sort items W in decreasing order of width and sort items H in decreasing order of height. Suppose hsum( W ) ≥ wsum( H). Let X be the largest prefix of W of total height at most 1, i.e., if hsum( W ) > 1, then X is a prefix of W such that hsum(X) = 1 (slice items if needed), and X = W otherwise. Pack X into a bin such that the items touch the right edge of the bin. Then we pack the largest possible prefix of H into the empty rectangular region of width 1 − wmax(X) in the left side of the bin. We call this a type-1 bin. See Figure 2a for an example. If hsum( W ) < wsum( H), we proceed analogously in a coordinate-swapped way, i.e., we first pack tall items in the bin and then pack wide items in the remaining space. Call this bin a type-2 bin. We pack the rest of the items into bins in the same way.   (c) A type-1 bin in the packing of I computed by skewed4Pack (see Section 3.2). The packing contains 5 tall containers in 2 tall shelves and 18 wide containers in 8 wide shelves. ▶ Definition 5. In a type-1 bin, let X and Y be wide and tall items, respectively. The bin is called full iff hsum(X) = 1 and wsum(Y ) = 1 − wmax(X). Similarly define full for type 2.
We first show that full bins pack items of large total area, and then show that if some bins have type 1 and some have type 2, then there are at most 2 non-full bins. This helps us upper-bound the number of bins used by greedyPack( W , H) in terms of a( W ∪ H).

Proof.
In the j th full bin of type 1, let X j be the items from W and Y j be the items from H. Let ℓ j := wmax(X j ) if j ≤ m 1 and ℓ m1+1 := 1/2. Since all items have their larger dimension more than 1/2, ℓ j ≥ 1/2 and hmax(Y j ) > 1/2, for any j ∈ [m 1 ].
Therefore, m 1 ≤ 4a(J 1 )/3 + 1/3. ◀ An analog of Lemma 6 can be proven for type-2 bins. Lemma 6 implies that very few full bins can have items of total area significantly less than 3/4. Suppose greedyPack( W , H) uses m bins. After j bins are packed, let A j be the height of the remaining items in W and B j be the width of the remaining items in H. Let t j be the type of the j th bin (1 for type-1 bin, 2 for type-2 bin). So t j = 1 ⇐⇒ A j−1 ≥ B j−1 .
We first show that |A j−1 −B j−1 | ≤ 1 =⇒ |A j −B j | ≤ 1, i.e., once | hsum( W )−wsum( H)| becomes at most 1 during greedyPack, it continues to stay at most 1. Next, we show that t j ̸ = t j+1 =⇒ |A j−1 − B j−1 | ≤ 1, i.e., if all bins don't have the same type, then | hsum( W ) − wsum( H)| eventually becomes at most 1 during greedyPack. In the first nonfull bin, we use up all the wide items or all the tall items. We will show that the remaining items have total height or total width at most 1, so we have at most 2 non-full bins.
In the j th bin, let a j be the height of items from W and b j be the width of items from H.
Proof. W.l.o.g., assume A j−1 ≥ B j−1 . So, t j = 1. Suppose a j < b j . Then a j < 1, so we used up W in the j th bin. Therefore, Proof. W.l.o.g., assume t j = 1 and t j+1 = 2. Then If all bins don't have the same type, then there can be at most 2 non-full bins.

The skewed4Pack Algorithm
We now return to the 2BP problem. skewed4Pack is an algorithm for 2BP takes as input a set I of rectangular items and a parameter ε ∈ (0, 1) where ε −1 ∈ Z. It outputs a 4-stage bin packing of I. skewed4Pack has the following outline: A. Use linear grouping [15, 28] to round up the width or height of each item in I. This gives us a new instance I. B. Pack I into 1/ε 2 + 1 shelves, after slicing some items. A shelf is a rectangular region with width or height more than 1/2 and is fully packed, i.e., the area of items in a shelf equals the area of the shelf. If we treat each shelf as an item, we get a new instance I. C. Compute a packing of I into bins, after possibly slicing some items, using greedyPack. D. Repack most items of I without slicing into the shelves. We will prove that the remaining items have very small area, so they can be packed separately using NFDH. We will use linear grouping [15,28] to round up the widths of W (L) and the heights of H (L) to get items W (L) and H (L) , respectively. By Claim 27 in Appendix A, items in W (L) have at most 1/ε 2 distinct widths and items in H (L) have at most 1/ε 2 distinct heights.

A. Item Classification and
Let be the minimum number of bins needed to pack X when items in X ∩ W (L) can be sliced using horizontal cuts, items in X ∩ H (L) can be sliced using vertical cuts, and items in X ∩ (W (S) ∪ H (S) ) can be sliced both vertically and horizontally. The following lemma follows from Lemma 28 in Appendix A.
B. Creating Shelves. We will use ideas from Kenyon and Rémila's 2SP algorithm [28] to pack I into shelves. Roughly, we solve a linear program to compute an optimal strip packing of W , where the packing is 3-stage. The first stage of cuts gives us shelves and the second stage gives us containers. From each shelf, we trim off space that doesn't belong to any container. See Section 3.3 for details. Let W be the shelves thus obtained. Analogously, we can pack items H into shelves H. Shelves in W are called wide shelves and shelves in H are called tall shelves. Let I := W ∪ H. We can interpret each shelf in I as a rectangular item. We allow slicing W and H using horizontal cuts and vertical cuts, respectively. In Section 3.3, we prove the following facts.
▶ Lemma 12. I has the following properties: (a) | W | ≤ 1 + 1/ε 2 and | H| ≤ 1 + 1/ε 2 ; (b) Each item in W has width more than 1/2 and each item in H has height more than 1/2; C. Packing Shelves into Bins. So far, we have packed I into shelves W and H. We will now use greedyPack( W , H) to pack the shelves into bins. By Claim 4, we get a 2-stage packing of W ∪ H into m bins, where we make at most m − 1 horizontal cuts in W and at most m − 1 vertical cuts in H. The horizontal cuts (resp. vertical cuts) increase the number of wide shelves (resp. tall shelves) from at most 1 + 1/ε 2 to at most m + 1/ε 2 . By Theorem 10, Lemma 12(d) and

D. Packing Items into Containers.
So far, we have a packing of shelves into m bins, where the shelves contain slices of items I. We will now repack a large subset of I into the shelves without slicing I. See Figure 2c for an example output. We do this using a standard greedy algorithm. See Appendix B for details of the algorithm and proof of the following lemma.
▶ Lemma 13. Let P be a packing of I into m bins, where we made at most m − 1 horizontal cuts in wide shelves and at most m − 1 vertical cuts in tall shelves. Then we can (without slicing) pack a large subset of I into the shelves in P such that the unpacked items (also called discarded items) from W have total area less than ε hsum( W ) + δ H (1 + ε)(m + 1/ε 2 ), and the unpacked items from H have area less than ε wsum( H) + δ W (1 + ε)(m + 1/ε 2 ).
We pack wide discarded items into new bins using NFDH and pack tall discarded items into new bins using NFDW. Finally, we prove the performance guarantee of skewed4Pack ε (I).
Proof. The discarded items are packed using NFDH or NFDW, which output a 2-stage packing. Since greedyPack outputs a 2-stage packing of the shelves and the packing of items into the shelves is a 2-stage packing, the bin packing of non-discarded items is a 4-stage packing. The time taken by skewed4Pack is at Suppose greedyPack uses at most m bins. By Theorem 10, m ≤ 4 fopt( I)/3+8/3. Let W d and H d be the items discarded from W and H, respectively. By Lemma 13 and Lemma 12(d), By Lemmas 3 and 11, the number of bins used by skewed4Pack ε (I) is less than Now we conclude with the proof of Theorem 1.

Creating Shelves
Here we will describe how to obtain shelves W and H from items W and H, respectively. Let opt SP ( W ) denote the optimal strip packing of W where items in W can be sliced using horizontal cuts. Then fopt( W ) = ⌈opt SP ( W )⌉. Hence, we will now try to compute a near-optimal strip packing of W . Define a horizontal configuration S as a tuple (S 0 , S 1 , S 2 , . . .) of 1/ε 2 + 1 non-negative integers, where S 0 ∈ {0, 1} and 1/ε 2 j=1 S j w j ≤ 1. For any horizontal line at height y in a strip packing of W , the multiset of items intersecting the line corresponds to a configuration. To obtain an optimal packing, we need to determine the height of each configuration. This can be done with the following linear program.
and S:S0=1 and x S ≥ 0 ∀S ∈ S Let x * be an optimal extreme-point solution to the above LP. This gives us a packing where the strip is divided into rectangular regions called shelves that are stacked on top of each other. Each shelf has a configuration S associated with it and has height h(S) := x * S and contains S j containers of width w j . Containers of width w j only contain items from W (L) j , and we call them type-j containers. If S 0 = 1, S also contains a container of width 1 − 1/ε 2 j=1 S j w j that contains small items. We call this container a type-0 container. Each container is fully filled with items. Let w(S) denote the width of shelf S, i.e., the sum of widths of all containers in ▶ Lemma 15. x * contains at most 1/ε 2 + 1 positive entries. Proof. Suppose w(S) ≤ 1/2. Then we could have split S into two parts by making a horizontal cut in the middle and packed the parts side-by-side, reducing the height of the strip by x * S /2. But that would contradict the fact that x * is optimal. ◀ Treat each shelf S as an item of width w(S) and height h(S). Allow each such item to be sliced using horizontal cuts. This gives us a new set W of items such that W can be packed inside W . By applying an analogous approach to H, we get a new set H of items. Let I := W ∪ H. We call the shelves of W wide shelves and the shelves of H tall shelves. The containers in wide shelves are called wide containers and the containers in tall shelves are called tall containers.

Almost-Optimal Bin Packing of Skewed Rectangles
In this section, we will describe the algorithm skewedCPack. skewedCPack takes as input a set I of items and a parameter ε ∈ (0, 1/2], where ε −1 ∈ Z. We will prove that skewedCPack has AAR 1 + 20ε when δ is sufficiently small. skewedCPack works roughly as follows: 1. Invoke the subroutine round(I) (cf. Section 4.1). round(I) returns a pair ( I, I med ). Here I med , called the set of medium items, has low total area, so we can pack it in a small number of bins. I, called the set of rounded items, is obtained by rounding up the width or height of each item in I − I med , so that I has properties that help us pack it easily. 2. Compute the optimal fractional compartmental bin packing of I (we will define fractional and compartmental later). 3. Use this packing of I to obtain a packing of I that uses slightly more number of bins.
To bound the AAR of skewedCPack, we will prove a structural theorem (Section 4.2), which says that the optimal fractional compartmental packing of I uses close to opt(I) bins.

Classifying and Rounding Items
We now describe the algorithm round and show that its output satisfies important properties.
Next We will now use linear grouping [15,28] to round up the widths of items W and the heights of items H to get items W and H, respectively. By Claim 27 in Appendix A, items in W have at most 1/(εε 1 ) distinct widths and items in H have at most 1/(εε 1 ) distinct heights. Let I := W ∪ H ∪ S.
▶ Definition 17 (Fractional packing). Suppose we are allowed to slice wide items in I using horizontal cuts, slice tall items in I using vertical cuts and slice small items in I using both horizontal and vertical cuts. For any X ⊆ I, a bin packing of the slices of X is called a fractional packing of X. The optimal fractional packing of X is denoted by fopt( X).
Proof. Directly follows from Lemma 28 in Appendix A. ◀

Structural Theorem
We will now define compartmental packing and prove the structural theorem, which says that the number of bins in the optimal fractional compartmental packing of I is roughly equal to fopt( I).
We first show how to discretize a packing, i.e., we show that given a fractional packing of items in a bin, we can remove a small fraction of tall and small items and shift the remaining items leftwards so that the left and right edges of each wide item belong to a constant-sized set T , where |T | ≤ (1 + 1/εε 1 ) 2/ε1−2 . Next, we define compartmental packing and show how to convert a discretized packing to a compartmental packing.
For any rectangle i packed in a bin, let x 1 (i) and x 2 (i) denote the x-coordinates of its left and right edges, respectively, and let y 1 (i) and y 2 (i) denote the y-coordinates of its bottom and top edges, respectively. Let R be the set of distinct widths of items in W . Given the way we rounded items, |R| ≤ 1/εε 1 . Recall that ε 1 ≤ ε ≤ 1/2 and ε −1 1 , ε −1 ∈ Z.
▶ Theorem 19. Given a fractional packing of items J ⊆ I into a bin, we can remove tall and small items of total area less than ε and shift some of the remaining items to the left such that for every wide item i, we get x 1 (i), x 2 (i) ∈ T .
Proof. For wide items u and v in the bin, we say that u ≺ v iff the right edge of u is to the left of the left edge of v. Formally u ≺ v ⇐⇒ x 2 (u) ≤ x 1 (v). We call u a predecessor of v. A sequence [i 1 , i 2 , . . . , i k ] such that i 1 ≺ i 2 ≺ . . . ≺ i k is called a chain ending at i k . For a wide item i, define level(i) as the number of items in the longest chain ending at i. Formally, level(i) := 1 if i has no predecessors, and (1 + max j≺i level(j)) otherwise. Let W j be the items at level j, i.e., W j := {i : level(i) = j}. Note that the level of an item can be at most 1/ε 1 − 1, since each wide item has width more than ε 1 . We will describe an algorithm for discretization. But first, we need to introduce two recursively-defined set families (S 1 , S 2 , . . .) and (T 0 , T 1 , . . .). Let T 0 := {0} and t 0 := 1. For any j > 0, define t j : Our discretization algorithm proceeds in stages, where in the j th stage, we apply two transformations to the items in the bin, called strip-removal and compaction. Strip-removal: For each x ∈ T j−1 , consider a strip of width δ j and height 1 in the bin whose left edge has coordinate x. Discard the slices of tall and small items inside the strips. Compaction: Move all tall and small items as much towards the left as possible (imagine a gravitational force acting leftwards on the tall and small items) while keeping the wide items fixed. Then move each wide item i ∈ W j leftwards till x 1 (i) ∈ S j .
Observe that the algorithm maintains the following invariant: after k stages, for each j ∈ [k], each item i ∈ W j has x 1 (i) ∈ S j (and hence x 2 (i) ∈ T j ). This ensures that after the algorithm ends, x 1 (i), x 2 (i) ∈ T . All that remains to prove is that the total area of items discarded during strip-removal is at most ε and that compaction is always possible.
Proof. In the j th stage, we create |T j−1 | strips, and each strip has total area at most δ j . Therefore, the area discarded in the j th stage is at most |T j−1 |δ j ≤ t j−1 δ j = εε 1 . Since there can be at most 1/ε 1 − 1 stages, we discard a total area of less than ε across all stages. ◀ ▶ Lemma 22. Compaction always succeeds, i.e., in the j th stage, while moving item i ∈ W j leftwards, no other item will block its movement.
Proof. Let i ∈ W j . Let z be the x-coordinate of the left edge of the strip immediately to the left of item i, i.e., z : In the j th strip-removal, we cleared the strip [z, z + δ j ] × [0, 1]. If x 1 (i) ∈ [z, z + δ j ], then i can freely move to z, and z ∈ T j−1 ⊆ S j . Since no wide item has its right edge in (z, x 1 (i)], if x 1 (i) > z + δ j , all the tall and small items whose left edge lies in [z + δ j , x 1 (i)] will move leftwards by at least δ j during compaction. Hence, there would be an empty space of width at least δ j to the left of item i. Therefore, we can move i leftwards to make x 1 (i) a multiple of δ j , and then x 1 (i) would belong to S j . ◀ Hence, compaction always succeeds and we get x 1 (i), x 2 (i) ∈ T for each wide item i. ◀

▶ Definition 23 (Compartmental packing). Consider a packing of some items into a bin.
A compartment C is defined as a rectangular region in the bin satisfying the following properties: x 1 (C), x 2 (C) ∈ T . y 1 (C), y 2 (C) are multiples of ε cont := εε 1 /6|T |. C does not contain both wide items and tall items. If C contains tall items, then x 1 (C) and x 2 (C) are consecutive values in T . If a compartment contains a wide item, it is called a wide compartment. Otherwise it is called a tall compartment. A packing of items into a bin is called compartmental iff there is a set of non-overlapping compartments in the bin such that each wide or tall item lies completely inside some compartment, and there are at most n W := 3(1/ε 1 − 1)|T | + 1 wide compartments and at most n H := (1/ε 1 − 1)|T | tall compartments in the bin. A packing of items into multiple bins is called compartmental iff each bin is compartmental.
Note that small items can be packed both inside and outside compartments.
The following lemma states that a discretized packing can be converted to a compartmental packing. It can be proved using standard techniques (e.g., Section 3.2.3 in [36]). See Appendix G.2 in [31] for a formal proof.
▶ Lemma 24. If x 1 (i), x 2 (i) ∈ T for each wide item i in a bin, then by removing wide and small items of area less than ε, we can get a compartmental packing of the remaining items. Let X be the set of wide and small discarded items and let Y be the set of tall discarded items. For each item i ∈ X, if w(i) ≤ 1/2, slice it using a horizontal cut in the middle and place the pieces horizontally next to each other to get a new item of width 2w(i) and height h(i)/2. Repeat until w(i) > 1/2. Now pack the items in bins by stacking them one-over-the-other so that for each item i ∈ X, x 1 (i) = 0. This will require less than 2a(X) + 1 bins, and the packing will be compartmental.
Similarly, we can get a compartmental packing of Y into 2a(Y ) + 1 bins. Since a(X ∪ Y ) < 2εm, we will require less than 4εm + 2 bins. Therefore, the total number of compartmental bins used to pack I is less than (1 + 4ε)m + 2. ◀

Packing Algorithm
We now describe the skewedCPack algorithm for packing a set I of n δ-skewed items.

Enumerating Packing of Compartments
We will now describe a subroutine, called iterPackings( I), that outputs all packings of empty compartments into at least ⌈a( I)⌉ bins and at most n bins. A packing of empty compartments in a bin is called a configuration. We will first enumerate all configurations and then output multisets of configurations of cardinality ranging from ⌈a( I)⌉ to n.   There can be at most n W := 3(1/ε 1 − 1)|T | + 1 wide compartments in a bin. Each wide compartment can have (1/ε cont ) 2 y-coordinates of the top and bottom edges and at most |T | 2 /2 x-coordinates of the left and right edges, where ε cont := εε 1 /6|T |. The rest of the space is for tall compartments. Therefore, the number of configurations is at most Since each configuration can have at most n bins, the number of combinations of configurations is at most (n+1) n C . Therefore, we can output all possible bin packings of empty compartments in O(n n C ) time. This completes the description of iterPackings.

Fractionally Packing Items into Compartments
For each bin packing P of empty compartments, we will try to fractionally pack the items into the bins. To do this, we will create a feasibility linear program, called FP( I, P ), that is feasible iff wide and tall items in I can be packed into the compartments in P . If FP( I, P ) is feasible, then small items can also be fractionally packed since P contains at least a( I) bins. Let w ′ 1 , w ′ 2 , . . . , w ′ p be the distinct widths of wide compartments in P . Let U j be the set of wide compartments in P having width w ′ j . Let h(U j ) be the sum of heights of the compartments in U j . By Definition 23, we know that p ≤ |T | 2 /2. Let w 1 , w 2 , . . . , w r be the distinct widths of items in W (recall that W is the set of wide items in I). Let W j be the items in W having width w j . Let h( W j ) be the sum of heights of all items in W j . By Claim 27, we get r ≤ 1/εε 1 . Let Intuitively, a wide configuration C represents a set of wide items that can be placed side-by-side into a compartment of width w ′ C0 . Let C be the set of all wide configurations. Then |C| ≤ p/ε r 1 , which is a constant. Let C j := {C ∈ C : C 0 = j}.
To pack W into wide compartments, we must determine the height of each configuration. Let x ∈ R |C| ≥0 be a vector where x C denotes the height of configuration C. Then W can be packed into wide compartments according to x iff x is a feasible solution to the following A. Khan and E. Sharma

22:15
feasibility linear program, named FP W ( I, P ): ( W j should be covered) C∈C and C0=j Let x * be an extreme point solution to FP W ( I, P ) (if FP W ( I, P ) is feasible). By Rank Lemma 4 , at most p + r entries of x * are non-zero. Since the number of variables and constraints is constant, x * can be computed in constant time.
Let H be the set of tall items in I. Items in H have at most 1/εε 1 distinct heights. Let there be q distinct heights of tall compartments in P . By Definition 23, we get q ≤ 1/ε cont = 6|T |/εε 1 . We can similarly define tall configurations and define a feasibility linear program for tall items, named FP H ( I, P ). H can be packed into tall compartments in P iff FP H ( I, P ) is feasible. Let y * be an extreme point solution to FP H ( I, P ). Then y * can be computed in constant time and y * has at most q + 1/εε 1 positive entries.
Hence, I can be packed into P iff FP( I, P ) := FP W ( I, P ) ∧ FP H ( I, P ) is feasible. The solution (x * , y * ) shows us how to split each compartment into shelves, where each shelf corresponds to a configuration C and the shelf can be split into C j containers of width w j and one container of width w ′ C0 − w(C). Let there be m bins in P . After splitting the configurations across compartments, we get at most p + q + 2/εε 1 + m(n W + n H ) shelves.

Converting a Fractional Packing to a Non-Fractional Packing
Consider a packing P of empty compartments into m bins. Let x * and y * be extreme-point solutions to FP W ( I, P ) and FP H ( I, P ), respectively (assuming I can fit into P ). Then (x * , y * ) gives us a fractional compartmental packing of I into m bins. We now show how to convert this to a non-fractional compartmental packing by removing some items from I.
Formally, we give an algorithm called greedyCPack( I, P, x * , y * ). It returns a pair (Q, D), where Q is a (non-fractional) compartmental bin packing of items I − D, where the compartments in the bins are as per P . D is called the set of discarded items.
greedyCPack is based on standard techniques. We prove in Appendix C.2 that We give an outline of greedyCPack here and defer the details to Appendix C.2. 1. For each j, iteratively assign wide items from W j to a container of width w j . When the total height of assigned items exceeds the height of the container, discard the last-assigned item and switch to a new container and repeat. 2. Similarly assign tall items to tall containers. 3. Identify rectangular regions where we can pack small items: For each configuration C, there is a free region of width w ′ C0 − w(C) and height x * C in a wide compartment. Similarly, we get free regions in tall compartments.
In each bin, the number of compartments is constant, so the space outside compartments be divided into a constant number of rectangular regions (see Lemma 29). Pack most of the small items into these free regions using NFDH. Discard the rest.

Summary
See Appendix C.3 for a precise description of skewedCPack.

Proof.
In an optimal fractional compartmental bin packing of I, let P * be the corresponding packing of empty compartments into bins. Hence, P * contains m := fcopt( I) bins. Since iterPackings( I) iterates over all bin packings of compartments, P * ∈ iterPackings( I).
Since wide and tall items in I can be packed into the compartments of P * , we get that x * and y * are not null. By Lemma 3, the number of bins used by NFDH to pack I med ∪ D is less than 2a( δ). Therefore, the number of bins used by skewedCPack(I) is less than (1) and a(I med ) ≤ εa(I)) (by Equation (2)

A Linear Grouping
In this section, we describe the linear grouping technique [15,28] for wide and tall items. Let ε and ε 1 be constants in (0, 1). Let W be a set of items where each item has width more than ε 1 . We will describe an algorithm, called lingroupWide that takes W , ε and ε 1 as input and returns the set W as output, where W is obtained by increasing the width of each item in W . lingroupWide(W, ε, ε 1 ) first arranges the items W in decreasing order of width and stacks them one-over-the-other (i.e., the widest item in W is at the bottom). Let h L be the height of the stack. Let y(i) be the y-coordinate of the bottom edge of item i. Split the stack into sections of height εε 1 h L each. For j ∈ [1/εε 1 ], let w j be the width of the widest item intersecting the j th section from the bottom, i.e., Round up the width of each item i to the smallest w j that is at least w(i) (see Figure 4). Let W j be the items whose width got rounded to w j and let W j be the resulting rounded items. (There may be ties, i.e., there may exist j 1 < j 2 such that w j1 = w j2 . In that case, define W j2 := W j2 = ∅. This ensures that all W j are disjoint.) Finally, define W := j W j . We can similarly define the algorithm lingroupTall. Let H be a set of items where each item has height more than ε 1 . lingroupTall that takes H, ε and ε 1 as input and returns H, where H is obtained by increasing the height of each item in H.
▷ Claim 27. Items in lingroupWide(W, ε, ε 1 ) have at most 1/(εε 1 ) distinct widths. Items in lingroupTall(H, ε, ε 1 ) have at most 1/(εε 1 ) distinct heights. to the first container C until the total height of the items exceeds h(C). Then move to the next container and repeat. As per the constraints of the linear program, all items in W (L) j will get assigned to some type-j wide container. Similarly, number the type-0 wide containers arbitrarily and number the items in W (S) arbitrarily. Greedily assign items from W (S) to the first container C until the total area of the items exceeds a(C). Then move to the next container and repeat. As per the constraints of the linear program, all items in W (S) will get assigned to some type-0 wide container. Similarly, assign all items from H to tall containers.
Let C be a type-j wide container and J be the items assigned to it. If we discard the last item from J, then the items can be packed into C. The area of the discarded item is at most w(C)δ H . Let C be a type-0 wide container and J be the items assigned to it. Arrange the items in J in decreasing order of height and pack the largest prefix J ′ ⊆ J into C using NFDW (Next-Fit Decreasing Width).

C.1 Removing Medium Items
Let T := ⌈2/ε⌉. Let µ 0 = ε. For t ∈ [T ], define µ t := f (µ t−1 ) and define Let r := argmin T t=1 a(J t ), I med := J r , ε 1 := µ r−1 . Each item belongs to at most 2 sets J t , so a(J t ) ≤ 2 ⌈2/ε⌉ a(I) ≤ εa(I). Proof. Extend the top and bottom edge of each rectangle leftwards and rightwards till they hit another rectangle or an edge of the bin. This decomposes the empty region into rectangles R. See Figure 5. Let (Q, D) := greedyCPack( I, P, x * , y * ), where P is a packing of empty compartments into m bins. We will describe greedyCPack and show that

C.2 Converting a Fractional Packing to a Non-Fractional Packing
For a configuration C in a wide compartment, there is a container of width w ′ C0 − w(C) available for packing small items. Hence, there are p + q + 2/εε 1 + m(n W + n H ) containers available inside compartments for packing small items. By Lemma 29, we can partition the space outside compartments into at most m(3(n W + n H ) + 1) containers. Therefore, the total number of containers available for packing small items is at most m S := (p + q + 2/εε 1 ) + m(4(n W + n H ) + 1) ≤ |T | 2 2 + 6|T | εε 1 Greedily assign small items to small containers, i.e., keep assigning small items to a container till the area of items assigned to it is at least the area of the container, and then resume from the next container. Each small item will get assigned to some container. For each container C, pack the largest possible prefix of the assigned items using the Next-Fit Decreasing Height (NFDH) algorithm. By Lemma 2, the area of unpacked items would be less than ε 2 + δ + ε 2 δ. Summing over all containers, we get that the unpacked area is less than (ε 2 + δ + ε 2 δ)m S ≤ 3ε 2 m S .
For each j, greedily assign wide items from W j to containers of width w j , i.e., keep assigning items till the height of items exceeds the height of the container. Each wide item will get assigned to some container. Then discard the last item from each container. For each shelf in a wide compartment having configuration C, the total area of items we discard is at most δw(C). Similarly, we can discard tall items of area at most δh(C) from each shelf in a tall compartment having configuration C.

C.3 Pseudocode for skewedCPack
Algorithm 1 skewedCPackε(I): Packs a set I of δ-skewed rectangular items into bins without rotating the items.

5:
// If FP W ( I, P ) is feasible, x * is an extreme-point solution to FP W ( I, P ).

11:
if Q ∪ Q D uses less bins than Q best then 12: Q best = Q ∪ Q D .

D Lower Bound on APoG
In this section, we prove a lower bound of roughly 4/3 on the APoG for skewed rectangles.

Proof sketch.
For an item packed in the bin, if the height is (1 − ε)/2k, call it a wide item, and if the width is (1 − ε)/2k, call it a tall item. Let W be the set of wide items in J.
We can rearrange the items in the bin so that all wide items touch the left edge of the bin and all tall items touch the bottom edge of the bin. See Appendix E in [31] for a formal proof and Figure 6 for an example.
Therefore, the square region of side length (1 − ε)/2 at the top-right corner of the bin is empty. Hence, the area occupied in each bin is at most 3/4 + ε/2 − ε 2 /4. This holds true even if items in I are allowed to be rotated.

Proof.
For an item i ∈ I, if h(i) = (1 − ε)/2k, call it a wide item, and if w(i) = (1 − ε)/2k, call it a tall item. Let W be the set of wide items and H be the set of tall items. Partition W into groups of k elements. In each group, stack items one-over-the-other. This gives us 2m containers of width (1 + ε)/2 and height (1 − ε)/2. Similarly, get 2m containers of height (1 + ε)/2 and height (1 − ε)/2 by stacking items from H side-by-side. We can pack 4 containers in one bin, so I can be packed into m bins. See Figure 7 for an example. Therefore, opt(I) ≤ m. We will now show a lower-bound on opt g (I). In any guillotine-separable packing of I, the area occupied by each bin is at most 3/4 + ε/2 − ε 2 /4 (by Lemma 30). Note that a(I) = m(1 − ε 2 ). Therefore, opt g (I) ≥ m(1 − ε 2 ) 3/4 + ε/2 − ε 2 /4 =⇒ opt g (I) opt(I)