Skip to main content
Log in

Tight Approximation Algorithms for Geometric Bin Packing with Skewed Items

  • Published:
Algorithmica Aims and scope Submit manuscript

Abstract

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 \(\lambda \) 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 \(\lambda {{\,\textrm{opt}\,}}(I) + c\), where \({{\,\textrm{opt}\,}}(I)\) is the number of bins in the optimal solution to 2BP for I and c is a constant. It is known that \(4/3 \le \lambda \le 1.692\). Bansal and Khan (2014) conjectured that \(\lambda = 4/3\). The conjecture, if true, will imply a \((4/3+\varepsilon )\)-approximation algorithm for 2BP. Given a small constant \(\delta > 0\), a rectangle is called large if both its height and width are at least \(\delta \), else it is called skewed. We make progress towards the conjecture by showing that \(\lambda = 4/3\) when all input rectangles are skewed. We also give an APTAS for 2BP for skewed items, though general 2BP does not admit an APTAS.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14

Similar content being viewed by others

Notes

  1. Consider a set I of items containing 2m rectangles of width 0.6 and height 0.4 and 2m rectangles of width 0.4 and height 0.6. Then \({{\,\textrm{opt}\,}}(I) = m\) and .

  2. Rank Lemma: the number of non-zero variables in an extreme-point solution to a linear program is at most the number of non-trivial constraints [42, Lemma 2.1.4]..

  3. Rank Lemma: the number of non-zero variables in an extreme-point solution to a linear program is at most the number of non-trivial constraints [42, Lemma 2.1.4]..

References

  1. Khan, A., Sharma, E.: Tight approximation algorithms For Geometric Bin Packing with skewed items. In: Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques (APPROX/RANDOM 2021). Leibniz International Proceedings in Informatics (LIPIcs), vol. 207, pp. 22–12223. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl, Germany (2021). https://doi.org/10.4230/LIPIcs.APPROX/RANDOM.2021.22

  2. Hoberg, R., Rothvoss, T.: A logarithmic additive integrality gap for bin packing. In: ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 2616–2625 (2017). https://doi.org/10.1137/1.9781611974782.172

  3. De La Vega, W.F., Lueker, G.S.: Bin packing can be solved within \(1+\varepsilon \) in linear time. Combinatorica 1(4), 349–355 (1981). https://doi.org/10.1007/BF02579456

    Article  MathSciNet  MATH  Google Scholar 

  4. Bansal, N., Correa, J.R., Kenyon, C., Sviridenko, M.: Bin packing in multiple dimensions: inapproximability results and approximation schemes. Math. Oper. Res. 31(1), 31–49 (2006). https://doi.org/10.1287/moor.1050.0168

    Article  MathSciNet  MATH  Google Scholar 

  5. Chung, F.R., Garey, M.R., Johnson, D.S.: On packing two-dimensional bins. SIAM J. Algebr. Discrete Methods 3(1), 66–76 (1982). https://doi.org/10.1137/0603007

    Article  MathSciNet  MATH  Google Scholar 

  6. Caprara, A.: Packing \(d\)-dimensional bins in \(d\) stages. Math. Oper. Res. 33, 203–215 (2008). https://doi.org/10.1287/moor.1070.0289

    Article  MathSciNet  MATH  Google Scholar 

  7. Bansal, N., Caprara, A., Sviridenko, M.: A new approximation method for set covering problems, with applications to multidimensional bin packing. SIAM J. Comput. 39(4), 1256–1278 (2010). https://doi.org/10.1137/080736831

    Article  MathSciNet  MATH  Google Scholar 

  8. Jansen, K., Prädel, L.: New approximability results for two-dimensional bin packing. In: ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 919–936 (2013). https://doi.org/10.1007/s00453-014-9943-z

  9. Bansal, N., Khan, A.: Improved approximation algorithm for two-dimensional bin packing. In: ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 13–25 (2014). https://doi.org/10.1137/1.9781611973402.2

  10. Chlebík, M., Chlebíková, J.: Hardness of approximation for orthogonal rectangle packing and covering problems. J. Discrete Algorithms 7(3), 291–305 (2009). https://doi.org/10.1016/j.jda.2009.02.002

    Article  MathSciNet  MATH  Google Scholar 

  11. Sweeney, P.E., Paternoster, E.R.: Cutting and packing problems: a categorized, application-orientated research bibliography. J. Oper. Res. Soc. 43(7), 691–706 (1992). https://doi.org/10.1057/jors.1992.101

    Article  MATH  Google Scholar 

  12. Gilmore, P.C., Gomory, R.E.: Multistage cutting stock problems of two and more dimensions. Oper. Res. 13(1), 94–120 (1965). https://doi.org/10.1287/opre.13.1.94

    Article  MATH  Google Scholar 

  13. Caprara, A., Lodi, A., Monaci, M.: Fast approximation schemes for two-stage, two-dimensional bin packing. Math. Oper. Res. 30(1), 150–172 (2005). https://doi.org/10.1287/moor.1040.0112

    Article  MathSciNet  MATH  Google Scholar 

  14. Bansal, N., Lodi, A., Sviridenko, M.: A tale of two dimensional bin packing. In: Symposium on Foundations of Computer Science (FOCS), pp. 657–666. IEEE (2005). https://doi.org/10.1109/SFCS.2005.10

  15. Coffman, E.G., Garey, M.R., Johnson, D.S., Tarjan, R.E.: Performance bounds for level-oriented two-dimensional packing algorithms. SIAM J. Comput. 9, 808–826 (1980). https://doi.org/10.1137/0209062

    Article  MathSciNet  MATH  Google Scholar 

  16. Gálvez, W., Grandoni, F., Ameli, A.J., Jansen, K., Khan, A., Rau, M.: A tight (\(3/2 + \varepsilon \)) approximation for skewed strip packing. In: International Workshop on Approximation Algorithms for Combinatorial Optimization Problems (APPROX) (2020). https://doi.org/10.4230/LIPIcs.APPROX/RANDOM.2020.44

  17. Christensen, H.I., Khan, A., Pokutta, S., Tetali, P.: Approximation and online algorithms for multidimensional bin packing: a survey. Comput. Sci. Rev. 24, 63–79 (2017). https://doi.org/10.1016/j.cosrev.2016.12.001

    Article  MathSciNet  MATH  Google Scholar 

  18. Bansal, N., Eliáš, M., Khan, A.: Improved approximation for vector bin packing. In: ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 1561–1579. SIAM (2016). https://doi.org/10.1137/1.9781611974331.ch106

  19. Sandeep, S.: Almost optimal inapproximability of multidimensional packing problems. In: Symposium on Foundations of Computer Science (FOCS), pp. 245–256 (2022). https://doi.org/10.1109/FOCS52979.2021.00033

  20. Khan, A., Sharma, E., Sreenivas, K.V.N.: Geometry meets vectors: approximation algorithms for multidimensional packing. In: Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS 2022), vol. 250, pp. 23:1–23:22 (2022). https://doi.org/10.4230/LIPIcs.FSTTCS.2022.23

  21. Khan, A., Sharma, E., Sreenivas, K.V.N.: Approximation algorithms for generalized multidimensional knapsack (2021) arXiv:2102.05854 [cs.DS]

  22. Steinberg, A.: A strip-packing algorithm with absolute performance bound 2. SIAM J. Comput. 26(2), 401–409 (1997). https://doi.org/10.1137/S0097539793255801

    Article  MathSciNet  MATH  Google Scholar 

  23. Harren, R., Jansen, K., Prädel, L., Van Stee, R.: A (\(5/3 + \varepsilon \))-approximation for strip packing. In: Workshop on Algorithms and Data Structures (WADS), pp. 475–487. Springer (2011). https://doi.org/10.1007/978-3-642-22300-6_40

  24. Kenyon, C., Rémila, E.: Approximate strip packing. In: Symposium on Foundations of Computer Science (FOCS), pp. 31–36 (1996). https://doi.org/10.1109/SFCS.1996.548461

  25. Jansen, K., van Stee, R.: On strip packing with rotations. In: ACM Symposium on Theory of Computing (STOC), pp. 755–761 (2005). https://doi.org/10.1145/1060590.1060702

  26. Jansen, K., Zhang, G.: On rectangle packing: maximizing benefits. In: ACM-SIAM Symposium on Discrete Algorithms (SODA), vol. 4, pp. 204–213 (2004)

  27. Gálvez, W., Grandoni, F., Heydrich, S., Ingala, S., Khan, A., Wiese, A.: Approximating geometric knapsack via L-packings. In: Symposium on Foundations of Computer Science (FOCS), pp. 260–271. IEEE (2017). https://doi.org/10.1109/FOCS.2017.32

  28. Gálvez, W., Grandoni, F., Khan, A., Ramirez-Romero, D., Wiese, A.: Improved approximation algorithms for 2-dimensional knapsack: packing into multiple L-shapes, spirals and more. In: International Symposium on Computational Geometry (SoCG), vol. 189, pp. 39:1–39:17 (2021). https://doi.org/10.4230/LIPIcs.SoCG.2021.39

  29. Sharma, E.: Harmonic algorithms for packing \(d\)-dimensional cuboids into bins. In: Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS 2021), vol. 213, pp. 32:1–32:22 (2021). https://doi.org/10.4230/LIPIcs.FSTTCS.2021.32

  30. Seiden, S.S., Woeginger, G.J.: The two-dimensional cutting stock problem revisited. Math. Program. 102(3), 519–530 (2005). https://doi.org/10.1007/s10107-004-0548-1

    Article  MathSciNet  MATH  Google Scholar 

  31. Khan, A., Maiti, A., Sharma, A., Wiese, A.: On guillotine separable packings for the two-dimensional geometric knapsack problem. In: International Symposium on Computational Geometry (SoCG), vol. 189, pp. 48:1–48:17 (2021). https://doi.org/10.4230/LIPIcs.SoCG.2021.48

  32. Pach, J., Tardos, G.: Cutting glass. In: International Symposium on Computational Geometry (SoCG), pp. 360–369 (2000). https://doi.org/10.1145/336154.336223

  33. Adamaszek, A., Har-Peled, S., Wiese, A.: Approximation schemes for independent set and sparse subsets of polygons. J. ACM 66(4), 29:1–29:40 (2019). https://doi.org/10.1145/3326122

  34. Khan, A., Pittu, M.R.: On guillotine separability of squares and rectangles. In: International Workshop on Approximation Algorithms for Combinatorial Optimization Problems (APPROX) (2020). https://doi.org/10.4230/LIPIcs.APPROX/RANDOM.2020.47

  35. Abed, F., Chalermsook, P., Correa, J., Karrenbauer, A., Pérez-Lantero, P., Soto, J.A., Wiese, A.: On guillotine cutting sequences. In: International Workshop on Approximation Algorithms for Combinatorial Optimization Problems (APPROX), pp. 1–19 (2015). https://doi.org/10.4230/LIPIcs.APPROX-RANDOM.2015.1

  36. Mitchell, J.S.B.: Approximating Maximum Independent Set for Rectangles in the Plane. In: Symposium on Foundations of Computer Science (FOCS), pp. 339–350 (2022). https://doi.org/10.1109/FOCS52979.2021.00042

  37. Gálvez, W., Khan, A., Mari, M., Mömke, T., Pittu, M.R., Wiese, A.: A 3-approximation algorithm for maximum independent set of rectangles. In: ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 894–905 (2022). https://doi.org/10.1137/1.9781611977073.38. SIAM

  38. Fishkin, A.V., Gerber, O., Jansen, K.: On efficient weighted rectangle packing with large resources. In: International Symposium on Algorithms and Computation (ISAAC), pp. 1039–1050. Springer (2005). https://doi.org/10.1007/11602613_103

  39. Alamdari, S., Biedl, T., Chan, T.M., Grant, E., Jampani, K.R., Keshav, S., Lubiw, A., Pathak, V.: Smart-grid electricity allocation via strip packing with slicing. In: Workshop on Algorithms and Data Structures (WADS), pp. 25–36. Springer (2013). https://doi.org/10.1007/978-3-642-40104-6_3

  40. Deppert, M.A., Jansen, K., Khan, A., Rau, M., Tutas, M.: Peak Demand Minimization via Sliced Strip Packing. In: Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques (APPROX/RANDOM 2021), vol. 207, pp. 21:1–21:24 (2021). https://doi.org/10.4230/LIPIcs.APPROX/RANDOM.2021.21

  41. Gálvez, W., Grandoni, F., Ameli, A.J., Khodamoradi, K.: Approximation Algorithms for Demand Strip Packing. In: Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques (APPROX/RANDOM 2021), vol. 207, pp. 20:1–20:24 (2021). https://doi.org/10.4230/LIPIcs.APPROX/RANDOM.2021.20

  42. Lau, L.C., Ravi, R., Singh, M.: Iterative Methods in Combinatorial Optimization, vol. 46. Cambridge University Press, Cambridge (2011)

    Book  MATH  Google Scholar 

  43. Prädel, L.D.: Approximation algorithms for geometric packing problems. PhD thesis, Kiel University (2012). https://macau.uni-kiel.de/servlets/MCRFileNodeServlet/dissertation_derivate_00004634/dissertation-praedel.pdf?AC=N

  44. Vanderbei, R.J.: Linear Programming: Foundations and Extensions. International Series in Operations Research & Management Science. Springer, Berlin (2013). https://doi.org/10.1007/978-1-4614-7630-6

    Book  Google Scholar 

  45. Bland, R.G.: New finite pivoting rules for the simplex method. Math. Oper. Res. 2(2), 103–107 (1977). https://doi.org/10.1287/moor.2.2.103

    Article  MathSciNet  MATH  Google Scholar 

  46. Johnson, D.S.: Near-optimal bin packing algorithms. PhD thesis, Massachusetts Institute of Technology, USA (1973)

  47. Bansal, N., Caprara, A., Jansen, K., Prädel, L., Sviridenko, M.: A structural lemma in 2-dimensional packing, and its implications on approximability. In: International Symposium on Algorithms and Computation (ISAAC), pp. 77–86. Springer (2009). https://doi.org/10.1007/978-3-642-10631-6_10

Download references

Funding

Arindam Khan is supported by the Pratiksha Trust Young Investigator Award and Google ExploreCSR grant.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Eklavya Sharma.

Ethics declarations

Conflict of interest

Eklavya Sharma is a student at the University of Illinois, Urbana-Champaign. The following members of Algorithmica’s editorial board are affiliated with the same university: Timothy M. Chan. Arindam Khan was a postdoctoral researcher at Technical University, Munich, Germany from November 2017 to December 2018. The following members of Algorithmica’s editorial board are affiliated with the same university: Susanne Albers, Harald Raecke.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Arindam Khan is supported by Pratiksha Trust Young Investigator Award and Google ExploreCSR grant. Eklavya Sharma did this work when he was a student at the Indian Institute of Science. A preliminary version of this paper appeared in the proceedings of the International Conference on Approximation Algorithms for Combinatorial Optimization Problems (APPROX) 2021 [1].

Appendices

Appendix A APoG for the Rotational Case

Theorem 33

Let \(\textrm{APoG}^{\textrm{nr}}\) and \(\textrm{APoG}^{\textrm{r}}\) be the APoG for the non-rotational and rotational versions, respectively, restricted to the \(\delta \)-skewed case. Then \(\textrm{APoG}^{\textrm{r}}\le \textrm{APoG}^{\textrm{nr}}\).

Proof

For a set I of \(\delta \)-skewed rectangular items, let \({{\,\textrm{opt}\,}}^{\textrm{nr}}(I)\) and \({{\,\textrm{opt}\,}}^{\textrm{r}}(I)\) be the minimum number of bins needed to pack I in the non-rotational and rotational versions, respectively. Let \({{\,\textrm{opt}\,}}^{\textrm{nr}}_g(I)\) and \({{\,\textrm{opt}\,}}^{\textrm{r}}_g(I)\) be the minimum number of guillotinable bins needed to pack I in the non-rotational and rotational versions, respectively. Assume w.l.o.g. that the bin has width and height at least 1.

Let I be any set of \(\delta \)-skewed items. Let K be the corresponding rotated items in the optimal rotational packing of I, i.e., \({{\,\textrm{opt}\,}}^{\textrm{r}}(I) = {{\,\textrm{opt}\,}}^{\textrm{nr}}(K)\). Then

$$\begin{aligned} {{\,\textrm{opt}\,}}^{\textrm{r}}_g(I)&\le {{\,\textrm{opt}\,}}^{\textrm{nr}}_g(K) \\ {}&\le \textrm{APoG}^{\textrm{nr}}{{\,\textrm{opt}\,}}^{\textrm{nr}}(K) + c \quad \quad \quad (c \,\hbox {is a constant}) \\ {}&= \textrm{APoG}^{\textrm{nr}}{{\,\textrm{opt}\,}}^{\textrm{r}}(I) + c. \end{aligned}$$

Hence, we get \(\textrm{APoG}^{\textrm{r}}\le \textrm{APoG}^{\textrm{nr}}\). \(\square \)

Appendix B \({{\,\mathrm{\texttt{skewedCPack}}\,}}\) with Item Rotations

In this section, we briefly explain changes to \({{\,\mathrm{\texttt{skewedCPack}}\,}}\) and its analysis so that they work for the case where items can be rotated by \(90^{\circ }\) and the ratio of the bin’s width and height is a constant.

For the rotational version of the problem, we assume w.l.o.g. that the width of the bin is 1 and the height of the bin is at least 1, because we can rotate the bin and scale its width and height equally. We also assume that the height of the bin is a constant. Since the input is \(\delta \)-skewed, we can assume w.l.o.g. that every item in the input has width at most \(\delta \), since otherwise we can rotate the item by \(90^{\circ }\).

To handle the rotational case, we do not require any change in Sect. 5.1.

The structural theorem in Sect. 5.2 doesn’t require any conceptual modifications. The only change is that the number of tall compartments in a tall cell can be more than \(1/\varepsilon _1-1\). Specifically, if the height of the bin is H, the number of tall compartments in a tall cell is now upper-bounded by \(H/\varepsilon _1\). (Hence, for the number of compartments to be a constant, we require the bin’s height to be a constant). This will increase the running time of \({{\,\mathrm{\texttt{iterPackings}}\,}}\), but there will be no change to Theorem 24.

The feasibility linear program of Sect. 5.5.2 will have to change to take item rotations into account. Instead of using two programs— \({{\,\textrm{FP}\,}}_W\) and \({{\,\textrm{FP}\,}}_H\)—which fractionally pack wide and tall items separately, we use just one program which will also decide which items to rotate. To do this, we allow an item to belong to both wide and tall configurations. The number of constraints in the feasibility linear program will be a constant that depends on \(\varepsilon \) and \(\varepsilon _1\).

The \({{\,\mathrm{\texttt{greedyCPack}}\,}}\) algorithm of Sect. 5.5.3 will remain the same, but the total area of discarded items will be slightly different because the number of compartments in a bin can now be larger. Finally, the AAR of \({{\,\mathrm{\texttt{skewedCPack}}\,}}\) for the rotational version will be \(1 + \Theta (1)\varepsilon \) by the same kind of analysis as in Sect. 5.3.

Appendix C Next-Fit Decreasing Height (NFDH)

In this section, we give proofs of the results in Sect. 2 related to NFDH algorithm [15].

1.1 C.1 Next-Fit

Our proofs rely on the Next-Fit algorithm for classical bin packing.

In the classical bin packing problem, we are given a set I of items, and an infinite supply of bins of capacity C, where each item i has a size \(s_i \in (0, C]\) associated with it. We need to pack the items into the minimum number of bins such that in each bin, items have total size at most C. Formally, for a set J of items, define \({{\,\textrm{size}\,}}(J) :=\sum _{i \in J} s_i\). Then our goal is to partition the items I into sets \(B_1, B_2, \ldots , B_m\) such that m is minimized and \({{\,\textrm{size}\,}}(B_j) \le C\) for all \(j \in [m]\).

In the Next-Fit algorithm, we repeatedly pack items into a bin till it is possible to do so. Then we close that bin, open a new bin, and resume. See Algorithm 3 for a more precise description.

figure c

Lemma 34

[46] Let I be a classical bin packing instance where bin capacity is C. Then the number of bins used by the Next-Fit algorithm [46] to pack I is less than \(2{{\,\textrm{size}\,}}(I)/C + 1\).

Lemma 35

[46] Let I be a classical bin packing instance, where each item has size at most \(\varepsilon \) and bin capacity is C. Then the number of bins used by the Next-Fit algorithm [46] to pack I is less than \({{\,\textrm{size}\,}}(I)/(C-\varepsilon ) + 1\).

1.2 C.2 Description of NFDH

Suppose we have rectangular items I that we want to pack into bins of width W and height H. The Next-Fit Decreasing Height (NFDH) algorithm [15] packs items into rectangular containers of width W called shelves, and packs the shelves into bins. For each shelf, the bottom edge of each item in it touches the bottom edge of the shelf. See Fig. 15 for an example output of NFDH.

Fig. 15
figure 15

7 items packed into 3 shelves by NFDH

The NFDH algorithm works roughly as follows:

  1. 1.

    Sort the items in non-increasing order of height.

  2. 2.

    Create a shelf whose height equals the height of the first item. Pack the largest prefix of I in the shelf from left-to-right. Then recursively pack the remaining items into more shelves.

  3. 3.

    Treat the shelves as a classical bin packing instance where the size of a shelf equals its height, and bin capacity is H. Pack the shelves into bins using \({{\,\mathrm{\texttt{NextFit}}\,}}\).

See Algorithm 4 for an equivalent but more precise description of NFDH.

figure d

1.3 C.3 Results on NFDH

Lemma 36

[15] Let I be a set of rectangles of width at most 1. Then I can be packed (without rotation) into a rectangular bin of width 1 and height less than \(2a(I) + max_{i \in I} h(i)\) using NFDH.

Lemma 37

Let I be a set of rectangles of width at most \(\varepsilon \). Then I can be packed (without rotation) into a rectangular bin of width W and height less than \(a(I)/(W-\varepsilon ) + max_{i \in I} h(i)\) using NFDH.

Proof

Let there be p shelves output by NFDH. Let \(S_j\) be the items in the \(j{\text {th}}\) shelf. Let \(h_j\) be the height of the \(j{\text {th}}\) shelf. Let H be the sum of heights of all the shelves.

For \(j \in [p-1]\), in the \(j{\text {th}}\) shelf, the total width of items is more than \((W-\varepsilon )\) and each item has height more than \(h_{j+1}\). Therefore, \(a(S_j) > h_{j+1}(W-\varepsilon )\).

Let H be the sum of heights of all the shelves. Then \(a(I) > \sum _{i=1}^{p-1} a(S_j) \ge \sum _{i=1}^{p-1} h_{j+1}(W-\varepsilon ) \ge (W-\varepsilon )(H - h_1)\). This implies \(H < a(I)/(W-\varepsilon ) + h_1\). \(\square \)

Lemma 4

Let I be a set of items where each item i has \(w(i) \le \delta _W\) and \(h(i) \le \delta _H\). NFDH can pack I into a bin of width W and height H if \(a(I) \le (W - \delta _W)(H - \delta _H)\).

Proof

(Also proved as Lemma 2(iii) in [47].)

NFDH packs the items into shelves of width W. Let \(\widetilde{H}\) be the total height of the shelves. By Lemma 37, we get \(\widetilde{H}< a(I)/(W-\delta _W) + \delta _H \le H\). Therefore, NFDH can fit I into the bin. \(\square \)

Lemma 38

Let I be a set of rectangular items where each item has height at most \(\delta \). Then the number of bins required by NFDH to pack I is less than \((2a(I)+1)/(1-\delta )\).

Proof

The bin packing version of NFDH first packs I into shelves and then packs the shelves into bins using Next-Fit. Let H be the sum of heights of all the shelves. By Lemma 36, \(H < 2a(I) + \delta \). By Lemma 35, the number of bins is less than \(1 + H/(1-\delta ) < (2a(I)+1)/(1-\delta )\). \(\square \)

Lemma 39

Let I be a set of rectangular items where each item has width at most \(\delta \). Then the number of bins required by NFDH to pack I is less than \(2a(I)/(1-\delta ) + 3\).

Proof

The bin packing version of NFDH first packs I into shelves and then packs the shelves into bins using Next-Fit. Let H be the sum of heights of all the shelves. By Lemma 37, \(H < a(I)/(1-\delta ) + 1\). By Lemma 34, the number of bins is less than \(2H + 1 < 2a(I)/(1-\delta ) + 3\). \(\square \)

Lemma 40

Let I be a set of rectangular items where each item has width at most \(\delta _W\) and height at most \(\delta _H\). Then the number of bins required by NFDH to pack I is at most \(a(I)/(1-\delta _W)(1-\delta _H) + 1/(1-\delta _H)\).

Proof

The bin packing version of NFDH first packs I into shelves and then packs the shelves into bins using Next-Fit. Let H be the sum of heights of all the shelves. By Lemma 37, \(H < a(I)/(1-\delta _W) + \delta _H\). By Lemma 35, the number of bins is less than \(1 + H/(1-\delta _H) < a(I)/(1-\delta _W)(1-\delta _H) + 1/(1-\delta _H)\). \(\square \)

Appendix D Linear Grouping

In this section, we describe the linear grouping technique [3, 24] for wide and tall items.

Let \(\varepsilon \) and \(\varepsilon _1\) be constants in (0, 1) such that \((\varepsilon \varepsilon _1)^{-1} \in \mathbb {Z}\). Let W be a set of items where each item has width more than \(\varepsilon _1\). We describe an algorithm called \({{\,\mathrm{\texttt{lingroupWide}}\,}}\) that takes W, \(\varepsilon \) and \(\varepsilon _1\) as input and returns the set \(\widehat{W}\) as output, where \(\widehat{W}\) is obtained by increasing the width of each item in W.

\({{\,\mathrm{\texttt{lingroupWide}}\,}}(W, \varepsilon , \varepsilon _1)\) first arranges the items W in non-increasing 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 \(\varepsilon \varepsilon _1h_L\) each. For \(j \in [1/\varepsilon \varepsilon _1]\), let \(w_j\) be the width of the widest item intersecting the \(j{\text {th}}\) section, i.e.,

$$\begin{aligned} w_j :=\max (\{w(i): i \in W \text { and } (y(i), y(i) + h(i)) \cap ((j-1)\varepsilon \varepsilon _1h_L, j\varepsilon \varepsilon _1h_L) \ne \emptyset \}). \end{aligned}$$

Round up the width of each item i to the smallest \(w_j\) that is at least w(i) (see Fig. 16). Let \(W_j\) be the items whose width got rounded to \(w_j\) and let \(\widehat{W}_j\) be the resulting rounded items. (There may be ties, i.e., there may exist \(j_1 < j_2\) such that \(w_{j_1} = w_{j_2}\). In that case, define \(W_{j_2} :=\widehat{W}_{j_2} :=\emptyset \). This ensures that all \(W_j\) are disjoint.) Finally, define \(\widehat{W}:=\bigcup _j \widehat{W}_j\). Then \(\widehat{W}_j\) is called the \(j{\text {th}}\) linear group of \(\widehat{W}\).

Fig. 16
figure 16

Example invocation of \({{\,\mathrm{\texttt{lingroupWide}}\,}}\) for \(\varepsilon = \varepsilon _1= 1/2\). Each linear group of \(\widehat{W}\) is given a unique color

We can similarly define the algorithm \({{\,\mathrm{\texttt{lingroupTall}}\,}}\). Let H be a set of items where each item has height more than \(\varepsilon _1\). \({{\,\mathrm{\texttt{lingroupTall}}\,}}\) takes H, \(\varepsilon \) and \(\varepsilon _1\) as input and returns \(\widehat{H}\), where \(\widehat{H}\) is obtained by increasing the height of each item in H.

Lemma 41

\({{\,\mathrm{\texttt{lingroupWide}}\,}}(W, \varepsilon , \varepsilon _1)\) runs in \(O(|W|\log |W| + 1/\varepsilon \varepsilon _1)\) time. \({{\,\mathrm{\texttt{lingroupTall}}\,}}(H, \varepsilon , \varepsilon _1)\) runs in \(O(|H|\log |H| + 1/\varepsilon \varepsilon _1)\) time.

Proof

Let \(n :=|W|\). Arranging items in W in non-increasing order of width takes \(O(n\log n)\) time. Computing \(w_1, w_2, \ldots \) takes \(O(n + 1/\varepsilon \varepsilon _1)\) time. Rounding up the width of all items takes \(O(n + 1/\varepsilon \varepsilon _1)\) time (by iterating over sorted lists W and \([w_1, w_2, \ldots ]\)). Hence, the total running time of \({{\,\mathrm{\texttt{lingroupWide}}\,}}(W, \varepsilon , \varepsilon _1)\) is \(O(n\log n + 1/\varepsilon \varepsilon _1)\). The running time of \({{\,\mathrm{\texttt{lingroupTall}}\,}}\) can be derived analogously. \(\square \)

Claim 42

Items in \({{\,\mathrm{\texttt{lingroupWide}}\,}}(W, \varepsilon , \varepsilon _1)\) have at most \(1/(\varepsilon \varepsilon _1)\) distinct widths. Items in \({{\,\mathrm{\texttt{lingroupTall}}\,}}(H, \varepsilon , \varepsilon _1)\) have at most \(1/(\varepsilon \varepsilon _1)\) distinct heights.

Lemma 43

Let W, H and S be sets of items, where items in W have width more than \(\varepsilon _1\) and items in H have height more than \(\varepsilon _1\). Let \(\widehat{W}:={{\,\mathrm{\texttt{lingroupWide}}\,}}(W, \varepsilon , \varepsilon _1)\) and \(\widehat{H}:={{\,\mathrm{\texttt{lingroupTall}}\,}}(H, \varepsilon , \varepsilon _1)\). If we allow slicing items in \(\widehat{W}\) and \(\widehat{H}\) using horizontal and vertical cuts, respectively, then we can pack \(\widehat{W}\cup \widehat{H}\cup S\) into less than \((1+\varepsilon ){{\,\textrm{opt}\,}}(W \cup H \cup S) + 2\) bins.

Proof

\({{\,\mathrm{\texttt{lingroupWide}}\,}}(W, \varepsilon , \varepsilon _1)\) arranges the items W in non-increasing order of width and stacks them one-over-the-other. Let \(h_L\) be the height of the stack. Split the stack into sections of height \(\varepsilon \varepsilon _1h_L\) each. For \(j \in [1/\varepsilon \varepsilon _1]\), let \(W_j'\) be the slices of items that lie between heights \((j-1)\varepsilon \varepsilon _1h_L\) and \(j\varepsilon \varepsilon _1h_L\). Let \(\widehat{W}_j'\) be the corresponding rounded items from \(W_j'\). Similarly define \(H_j'\) and \(\widehat{H}_j'\).

Consider the optimal packing of \(W \cup H \cup S\). To convert this to a packing of \(\widehat{W}\cup \widehat{H}\cup S - (\widehat{W}_1' \cup \widehat{H}_1')\), unpack \(W_1'\) and \(H_1'\), and for each \(j \in [1/\varepsilon \varepsilon _1-1]\), pack \(\widehat{W}_{j+1}'\) in the place of \(W_j'\) and pack \(\widehat{H}_{j+1}'\) in the place of \(H_j'\), possibly after slicing the items. This gives us a packing of \(\widehat{W}\cup \widehat{H}\cup S - (\widehat{W}_1' \cup \widehat{H}_1')\) into \(m_1\) bins, where \(m_1 \le {{\,\textrm{opt}\,}}(W \cup H \cup S)\).

We can pack \(\widehat{H}_1'\) by stacking the items side-by-side on the base of bins. We can pack \(\widehat{W}_1'\) into bins by stacking the items one-over-the-other. Recall that \(h_L\) is the total height of items in \(\widehat{W}\). Let \(w_L\) be the total width of items in \(\widehat{H}\). This gives us a packing of \(\widehat{W}_1' \cup \widehat{H}_1'\) into \(m_2 :=\lceil \varepsilon \varepsilon _1h_L \rceil + \lceil \varepsilon \varepsilon _1w_L \rceil \) bins. Since \({{\,\textrm{opt}\,}}(W \cup H \cup S) \ge a(W) + a(H) \ge \varepsilon _1(h_L + w_L)\), we get \(m_2 = \lceil \varepsilon \varepsilon _1h_L \rceil + \lceil \varepsilon \varepsilon _1w_L \rceil < \varepsilon {{\,\textrm{opt}\,}}(W \cup H \cup S) + 2\). Therefore, we get a packing of \(\widehat{W}\cup \widehat{H}\cup S\) into \(m_1 + m_2\) bins and \(m_1 + m_2 < (1+\varepsilon ){{\,\textrm{opt}\,}}(W \cup H \cup S) + 2\). \(\square \)

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Khan, A., Sharma, E. Tight Approximation Algorithms for Geometric Bin Packing with Skewed Items. Algorithmica 85, 2735–2778 (2023). https://doi.org/10.1007/s00453-023-01116-0

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-023-01116-0

Keywords

Navigation