Abstract
In the d-dimensional online bin packing problem, d-dimensional cubes of positive sizes no larger than 1 are presented one by one to be assigned to positions in d-dimensional unit cube bins. In this work, we provide improved upper bounds on the asymptotic competitive ratio for square and cube bin packing problems, where our bounds do not exceed 2.0885 and 2.5735 for square and cube packing, respectively. To achieve these results, we adapt and improve a previously designed harmonic-type algorithm, and apply a different method for defining weight functions. We detect deficiencies in the state-of-the-art results by providing counter-examples to the current best algorithms and their analysis, where the claimed bounds were 2.1187 for square packing and 2.6161 for cube packing.
Similar content being viewed by others
References
Azar, Y., Cohen, I.R., Kamara, S., Shepherd, F.B.: Tight bounds for online vector bin packing. In Proceedings of the 45th ACM Symposium on Theory of Computing (STOC’13), pp. 961–970, (2013)
Balogh, J., Békési, J., Dósa, Gy., Epstein, L., Levin, A.: A new and improved algorithm for online bin packing. In Proceedings of the 26th European Symposium on Algorithms (ESA’18), pp. 5:1–5:14, (2018)
Balogh, J., Békési, J., Dósa, Gy., Epstein, L., Levin, A.: Lower bounds for several online variants of bin packing. Theory Comput. Syst. 63(8), 1757–1780 (2019)
Balogh, J., Békési, J., Dósa, Gy., Epstein, L., Levin, A.: A new lower bound for classic online bin packing. (2018) CoRR, arXiv:1807.05554, Also in Proceedings of the WAOA’19
Balogh, J., Békési, J., Galambos, G.: New lower bounds for certain classes of bin packing algorithms. Theory Comput. Syst. 440–441, 1–13 (2012)
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)
Blitz, D.: Lower bounds on the asymptotic worst-case ratios of on-line bin packing algorithms. Master’s thesis, University of Rotterdam, Rotterdam, The Netherlands (1996)
Blitz, D., Heydrich, S., van Stee, R., van Vliet, A., Woeginger, G.J.: Improved lower bounds for online hypercube and rectangle packing. (2016) CoRR, arXiv:1607.01229v2
Brown, D.J.: A lower bound for on-line one-dimensional bin packing algorithms. Coordinated Science Laboratory Report no. R-864 (UILU-ENG 78-2257), (1979)
Christensen, H.I., Khan, A., Pokutta, S., Tetali, P.: Multidimensional bin packing and other related problems: a survey. Comput. Sci. Rev. 24, 63–79 (2017)
Coffman, E.G., Jr., Garey, M., Johnson, D.S.: Approximation algorithms for bin packing: a survey. In: Hochbaum, D. (ed.) Approximation Algorithms for NP-Hard Problems, pp. 46–93. PWS Publishing Co., Boston (1996)
Coppersmith, D., Raghavan, P.: Multidimensional online bin packing: algorithms and worst case analysis. Oper. Res. Lett. 8, 17–20 (1989)
Csirik, J., Frenk, J.B.G., Labbe, M.: Two-dimensional rectangle packing: on-line methods and results. Discret. Appl. Math. 45(3), 197–204 (1993)
Csirik, J., van Vliet, A.: An on-line algorithm for multidimensional bin packing. Oper. Res. Lett. 13(3), 149–158 (1993)
Csirik, J., Woeginger, G.J.: On-line packing and covering problems. In Fiat, A., Woeginger, G.J. (eds.) Online Algorithms: The State of the Art. pp. 147–177 (1998)
Epstein, L.: Two-dimensional online bin packing with rotation. Theoret. Comput. Sci. 411(31–33), 2899–2911 (2010)
Epstein, L.: A lower bound for online rectangle packing. J. Comb. Optim. 38(3), 846–866 (2019)
Epstein, L., van Stee, R.: Online square and cube packing. Acta Inf. 41(9), 595–606 (2005)
Epstein, L., van Stee, R.: Optimal online algorithms for multidimensional packing problems. SIAM J. Comput. 35(2), 431–448 (2005)
Epstein, L., van Stee, R.: Bounds for online bounded space hypercube packing. Discret. Optim. 4(2), 185–197 (2007)
Fernandez de la Vega, W., Lueker, G.S.: within \(1+\varepsilon \) in linear time. Combinatorica 1(4), 349–355 (1981)
Fujita, S., Hada, T.: Two-dimensional on-line bin packing problem with rotatable items. Theoret. Comput. Sci. 289(2), 939–952 (2002)
Galambos, G.: A 1.6 lower-bound for the two-dimensional on-line rectangle bin-packing. Acta Cybern. 10(1–2), 21–24 (1991)
Galambos, G., van Vliet, A.: Lower bounds for 1-, 2- and 3-dimensional on-line bin packing algorithms. Computing 52(3), 281–297 (1994)
Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of of NP-Completeness. Freeman and Company, San Francisco (1979)
Han, X., Chin, F.Y., Ting, H.-F., Zhang, G., Zhang, Y.: A new upper bound 2.5545 on 2d online bin packing. ACM Trans. Algorithms 7(4), 50 (2011)
Han, X., Ye, D., Zhou, Y.: Improved online hypercube packing. (2016) CoRR, arXiv:cs/0607045, Also in Proceedings of the WAOA’06
Han, X., Ye, D., Zhou, Y.: A note on online hypercube packing. CEJOR 18(2), 221–239 (2010)
Heydrich, S., van Stee, R.: Beating the harmonic lower bound for online bin packing. In Proceedings of 43rd International Colloquium on Automata, Languages, and Programming (ICALP’16), pp. 41:1–41:14 (2016)
Johnson, D.S.: Fast algorithms for bin packing. J. Comput. Syst. Sci. 8(3), 272–314 (1974)
Johnson, D.S., Demers, A., Ullman, J., Garey, M., Graham, R.: Worst-case performance bounds for simple one-dimensional packing algorithms. SIAM J. Comput. 3(4), 299–325 (1974)
Karmarkar, N., Karp, R.M.: An efficient approximation scheme for the one-dimensional bin-packing problem. In Proceedings of the 23rd Annual Symposium on Foundations of Computer Science (FOCS’82), pp. 312–320, (1982)
Liang, F.M.: A lower bound for on-line bin packing. Inf. Process. Lett. 10(2), 76–79 (1980)
Lee, C.C., Lee, D.T.: A simple online bin packing algorithm. J. ACM 32(3), 562–572 (1985)
Miyazawa, F.K., Wakabayashi, Y.: Cube packing. Theoret. Comput. Sci. 297(1–3), 355–366 (2003)
Ramanan, P., Brown, D.J., Lee, C.C., Lee, D.T.: Online bin packing in linear time. J. Algorithms 10(3), 305–326 (1989)
Rothvoss, T.: Better bin packing approximations via discrepancy theory. SIAM J. Comput. 45(3), 930–946 (2016)
Seiden, S.S.: On the online bin packing problem. J. ACM 49(5), 640–671 (2002)
Seiden, S.S., van Stee, R.: New bounds for multidimensional packing. Algorithmica 36(3), 261–293 (2003)
Simchi-Levi, D.: New worst-case results for the bin-packing problem. Nav. Res. Logist. 41(4), 579–585 (1994)
Ullman, J.D.: The performance of a memory allocation algorithm. Technical Report 100. Princeton University, Princeton (1971)
van Vliet, A.: An improved lower bound for online bin packing algorithms. Inf. Process. Lett. 43(5), 227–284 (1992)
van Vliet, A.: Lower and upper bounds for online bin packing and scheduling heuristics. PhD thesis, Erasmus University, Rotterdam, The Netherlands (1995)
Woeginger, G.J.: Improved space for bounded-space online bin packing. SIAM J. Discret. Math. 6, 575–581 (1993)
Yao, A.C.C.: New algorithms for bin packing. J. ACM 27(2), 207–227 (1980)
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
There are no conflicts of interest or competing interests for this work.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
An extended abstract of this work appears in the proceedings of WADS’21.
Appendices
An Example for Algorithm EH
In this section, we show how EH behaves for a given smaller example for \(d=2\). We now provide the intervals parameters \(\alpha _i\) and \(\Delta _i\) that are required by Algorithm 1; see Table 10.
Note that in any face of the bin, item of type 3 has at least \(\frac{1}{3}\) space left so any red item with size at most \(\frac{1}{3}\) can be packed into a (3, ?) bin. Similarly, any red item with size at most 0.3 can be packed into a (2, ?) bin.
\(j = \phi (i)\) | \(\Delta _j\) | Types of red items that are accepted |
---|---|---|
1 | 0.3 | 6 |
2 | \(\frac{1}{3}\) | 5, 6 |
First, we will describe the input. The input is described by 5 batches of items, arriving in the order defined below.
Input \(\varvec{I}\)
-
1.
One item of size 0.9,
-
2.
Two items of size \(\frac{2}{3}\) each,
-
3.
Two items of size 0.3 each,
-
4.
14 items of size \(\frac{1}{3}\) each,
-
5.
12 items of size 0.3 each.
In what follows, upon receiving multiple items, we will illustrate how they are packed using Algorithm 1. First, items \(0.9,\frac{2}{3},\frac{2}{3},0.3,0.3\) which fall in intervals \(I_1, I_3, I_3, I_6, I_6\), respectively, arrive. Since \(e_i \ge \lfloor \alpha _i \cdot n_i\rfloor \) for \(i=1,3,6\) in each step (every values is either equal to zero or rounded down to zero) and \(\phi (1),\phi (6)=0\), all the items will be colored blue and four new bins of types (1), (3, ?), (3, ?), (6) will be opened to pack these items. We call them (a), (b), (c), (d) respectively; See Fig. 4.
Note that \(\delta _1 = 0\) and \(\beta _1=1\), i.e., there is no space left in bins type (1) for red items and only one item from interval 1 can be packed into a bin of type (1). Hence, bin (a) will not be used again.
The next fourteen items in the input sequence are of type 5. Since \(\alpha _5=0.4\), five of the fourteen items will be colored red and the remaining nine items will be colored blue. The items colored red are the third, fifth, 8th, 10th, and 13th items of type 5. The red items will be packed into bin (b) since \(\Delta _{\phi (3)} \le \gamma _5 \cdot t_5\), and all the nine blue items will be packed into a new bin which called (e); see Fig. 5.
Note that bins (b), (e) will not be used again, since they have no space left. The next twelve items in the input sequence are of type 6, and observe that there have been already two items of type 6 in the input. Since \(\alpha _6=0.4\), five of the twelve items will be colored red while the remaining seven items will be colored blue. The red items will be packed into bin (c) since \(\Delta _{\phi (3)} \le \gamma _6 \cdot \cdot t_6\), while the remaining blue items (of the twelve items) will be packed into the “active” bin of type (6); see Fig. 6.
The output of Algorithm 1 on the aforementioned example, is illustrated below; Figure 1 contains the packing of the last batch and Fig. 7 contains the complete output.
The Limitations of Algorithms Studied in This Work
In this section we provide an example that is not original, and it does not deal with the algorithm of [28] but with all Extended Harmonic algorithms. It was known for a while that algorithms that use types and do not combine items based on their exact sizes cannot have an asymptotic competitive ratio below 1.5833333 for one dimension. A similar construction for squares and cubes can be found in [8]. These constructions consist of a large number of inputs, and the calculations of [8] are not always justified mathematically (inequalities are used as equalities without any explanation). However, the results in fact hold, and we provide a short proof for that.
Proposition 14
Every Extended Harmonic algorithm, for any dimension \(d \ge 1\), has an asymptotic competitive ratio of at least \(3-\frac{1}{2^d}-\frac{1}{4^d}-\frac{2^{d+1}}{3^d}+\frac{2}{3^d}\). In particular, for \(d=1,2,3\), the lower bounds on the asymptotic competitive ratios of such algorithms are approximately 1.5833333, 2.0208333, and 2.34085648.
Proof
We will introduce two inputs, where these inputs will consist of four types of items. There are small items, and items of size \(\frac{1}{2}+\delta \) for a very small \(\delta >0\). We start with checking the types that contain the values \(\frac{1}{3}\) and \(\frac{2}{3}\). Consider the type for \(\frac{1}{3}\). If it is the right endpoint of the interval for the type, we move to the next type (whose left endpoint is \(\frac{1}{3}\)). For example, if the interval is \((\frac{1}{4},\frac{1}{3}]\), we use the next one (and its form is \((\frac{1}{3}, t_j]\)), but if the interval contains \(\frac{1}{3}\) as an internal point (for example, (0.33, 0.34]), we use that interval. Since intervals are half open and half closed, and have positive lengths, the interval of \(\frac{2}{3}\) does not have it as a left endpoint.
Let \(\varepsilon \) be a sufficiently small value that in particular satisfies the property that \(\frac{1}{3}+\varepsilon \) and \(\frac{2}{3}-\varepsilon \) are internal points of the considered intervals (for example, if the first one is \((\frac{1}{3},0.336]\) and the second one is \((0.666,\frac{2}{3}]\), we can use \(\varepsilon =0.0001\)). Let \(\beta \) be the proportion of red items for the type of \(\frac{1}{3}+\varepsilon \). Let N be a large positive integer.
The first input also has \((2^d-1)\cdot N\) items of size \( \frac{1}{3}+\varepsilon \), and it has N items of size \(\frac{1}{2}+\varepsilon \). It has small items with total volume of \(N\cdot (1-\frac{2^d-1}{3^d}-\frac{1}{2^d})\). An optimal solution has N bins, each with \(2^d-1\) items of size \(\frac{1}{3}+\varepsilon \), one item of size \(\frac{1}{2}+\varepsilon \) and small items, and there may be one additional bin with small items (for a sufficiently small value of \(\varepsilon \)), where this bin can be neglected for large values of N. The algorithm has N bins with items of size \(\frac{1}{2}+\varepsilon \), and since the small items are packed separately and the number of bins is at least their volume, the number of bins for these items is at least \(N\cdot (1-\frac{2^d-1}{3^d}-\frac{1}{2^d})\). There are at least \(\frac{\beta \cdot (2^d-1)\cdot N}{2^d-1}=\beta \cdot N\) bins with red items of size \(\frac{1}{3}+\varepsilon \), and at least \(\frac{(1-\beta ) \cdot (2^d-1)\cdot N}{2^d}=N \cdot (1-\beta )\cdot (1-\frac{1}{2^d}) \) bins with blue items of this size. Since all or some of the red items can be possibly packed with items of size \(\frac{1}{2}+\varepsilon \), we do not take the bins with red items into account (though their existence may increase the cost of the algorithm, if \(\beta \) is large). No other items can be combined. Thus, the cost of the algorithm is at least \(N\cdot (1+(1-\frac{2^d-1}{3^d}-\frac{1}{2^d})+\frac{(1-\beta )(2^d-1)}{2^d})=N\cdot (3-\frac{1}{2^{d-1}}+\frac{1}{3^d}-\frac{2^d}{3^d}-\beta \cdot (1-\frac{1}{2^d})) \), and we get \(3+\frac{1}{3^d}-\frac{1}{2^{d-1}}-\frac{2^d}{3^d}-\beta \cdot (1-\frac{1}{2^d})\le R\).
The second input has \((2^d-1)\cdot N\) items of size \( \frac{1}{3}+\varepsilon \) and N items of size \(\frac{2}{3}-\varepsilon \). It has small items with total volume of \(N\cdot (1-\frac{2^d-1}{3^d}-\frac{2^d}{3^d})=N\cdot (1-\frac{2^{d+1}-1}{3^d})\). Note that this amount is non-negative for all integers \(d\ge 1\), and it is equal to zero for \(d=1\). An optimal solution for this input has N bins with one item of the larger size, and \(2^d-1\) items of the smaller size. In addition it has small items in every bin if \(d>1\) (and there might be one bin of small items only). However, since the interval of \(\frac{2}{3}-\varepsilon \) has \(\frac{2}{3}\) in its interval, the algorithm cannot combine items of the two sizes into a bin (since the right endpoints of the intervals of the two types are too large). The algorithm creates (up to a constant number of bins, due to rounding) \(\frac{\beta \cdot (2^d-1)\cdot N}{2^d-1}=\beta \cdot N\) bins with \(2^d-1\) red items of size \(\frac{1}{3}+\varepsilon \), and \(\frac{(1-\beta ) \cdot (2^d-1)\cdot N}{2^d}=N\cdot (1-\beta )\cdot (1-\frac{1}{2^d})\) bins with sets of \(2^d\) blue items. It also creates N bins with items of size \(\frac{2}{3}-\varepsilon \), and \(N\cdot (1-\frac{2^{d+1}-1}{3^d})\) bins of small items. The total number of bins is \(N\cdot (\beta +1-\beta -\frac{1}{2^d}+\frac{\beta }{2^d}+1+(1-\frac{2^{d+1}-1}{3^d}))=N\cdot (3-\frac{2^{d+1}}{3^d}+\frac{1}{3^d}-\frac{1}{2^d}+ \frac{\beta }{2^d})\), and by letting R be the asymptotic competitive ratio, we get \(3-\frac{2^{d+1}}{3^d}+\frac{1}{3^d}-\frac{1}{2^d}+ \frac{\beta }{2^d} \le R\). By multiplying this inequality by \(2^d-1\) we get \(3\cdot 2^d-\frac{2^{2d+1}}{3^d}+\frac{2^d}{3^d}-4+\frac{2^{d+1}}{3^d}-\frac{1}{3^d}+\frac{1}{2^d} +\beta \cdot (1-\frac{1}{2^d})\le (2^d-1)\cdot R\).
Taking the sum of the last inequality and the one for the first input we have \((3+\frac{1}{3^d}-\frac{1}{2^{d-1}}-\frac{2^d}{3^d}-\beta \cdot (1-\frac{1}{2^d}))+(3\cdot 2^d-\frac{2^{2d+1}}{3^d}+\frac{2^d}{3^d}-4+\frac{2^{d+1}}{3^d}-\frac{1}{3^d}+\frac{1}{2^d} +\beta \cdot (1-\frac{1}{2^d}))\le 2^d \cdot R\). By rearranging, we get \(2^d \cdot R \ge 3\cdot 2^d-\frac{2^{2d+1}}{3^d}+\frac{2^{d+1}}{3^d}-1-\frac{1}{2^d}\), and therefore \(R \ge 3-\frac{2^{d+1}}{3^d}+\frac{2}{3^d}-\frac{1}{2^d}-\frac{1}{4^d}\). \(\square \)
Given this lower bound, our upper bound on the asymptotic competitive ratio of our algorithm for \(d=2\) is not much larger than the best possible bound that can be proved by an algorithm of the family of algorithms studied here.
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.
About this article
Cite this article
Epstein, L., Mualem, L. Online Bin Packing of Squares and Cubes. Algorithmica 85, 1415–1458 (2023). https://doi.org/10.1007/s00453-022-01078-9
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00453-022-01078-9