Online bin stretching with three bins

Abstract

Online bin stretching is a semi-online variant of bin packing in which the algorithm has to use the same number of bins as an optimal packing, but is allowed to slightly overpack the bins. The goal is to minimize the amount of overpacking, i.e., the maximum size packed into any bin. We give an algorithm for online bin stretching with a stretching factor of \(11/8 = 1.375\) for three bins. Additionally, we present a lower bound of \(45/33 = 1.\overline{36}\) for online bin stretching on three bins and a lower bound of 19/14 for four and five bins that were discovered using a computer search.

This is a preview of subscription content, access via your institution.

Fig. 1

Notes

  1. 1.

    One can also use online solver at http://www3.nd.edu/~jeff/mathprog/.

References

  1. Albers, S., & Hellwig, M. (2012). Semi-online scheduling revisited. Theoretical Computer Science, 443, 1–9.

    Article  Google Scholar 

  2. Aspnes, J., Azar, Y., Fiat, A., Plotkin, S., & Waarts, O. (1997). On-line load balancing with applications to machine scheduling and virtual circuit routing. Journal of the ACM, 44, 486–504.

    Article  Google Scholar 

  3. Azar, Y., & Regev, O. (1998). On-line bin-stretching. In M. Luby, J. D. P. Rolim, M. Serna (Eds.), Randomization and approximation techniques in computer science (pp. 71–81). Berlin: Springer. http://link.springer.com/book/10.1007%2F3-540-49543-6

  4. Azar, Y., & Regev, O. (2001). On-line bin-stretching. Theoretical Computer Science, 268(1), 17–41.

    Article  Google Scholar 

  5. Berman, P., Charikar, M., & Karpinski, M. (2000). On-line load balancing for related machines. Journal of Algorithms, 35, 108–121.

    Article  Google Scholar 

  6. Böhm, M. (2016). Lower bounds for online bin stretching with several bins. In E. Bampis, O. Svensson (Eds.), Student research forum papers and posters at SOFSEM 2016, CEUR WP, vol. 1548. http://www.springer.com/us/book/9783319182629

  7. Böhm, M., Sgall, J., van Stee, R., & Veselý, P. (2014). Better algorithms for online bin stretching. In Approximation and online algorithms (pp. 23–34). Berlin: Springer.

  8. Böhm, M., Sgall, J., van Stee, R., & Veselý, P. (2016). A two-phase algorithm for bin stretching with stretching factor 1.5. ArXiv preprint arXiv:1601.08111v2.

  9. Coffman, E., Jr., Csirik, J., Galambos, G., Martello, S., & Vigo, D. (2013). Bin packing approximation algorithms: Survey and classification. In P. M. Pardalos, D.-Z. Du, & R. L. Graham (Eds.), Handbook of combinatorial optimization (pp. 455–531). New York: Springer.

  10. Ebenlendr, T., Jawor, W., & Sgall, J. (2009). Preemptive online scheduling: Optimal algorithms for all speeds. Algorithmica, 53, 504–522.

    Article  Google Scholar 

  11. Gabay, M., Brauner, N., & Kotov, V. (2013a). Computing lower bounds for semi-online optimization problems: Application to the bin stretching problem. HAL preprint hal-00921663, version 2.

  12. Gabay, M., Brauner, N., & Kotov, V. (2015). Improved lower bounds for the online bin stretching problem. HAL preprint hal-00921663, version 3.

  13. Gabay, M., Kotov, V., & Brauner, N. (2013b). Semi-online bin stretching with bunch techniques. HAL preprint hal-00869858.

  14. Graham, R. L. (1969). Bounds on multiprocessing timing anomalies. SIAM Journal on Applied Mathematics, 17, 263–269.

    Google Scholar 

  15. Johnson, D. (1973). Near-optimal bin packing algorithms. Massachusetts Institute of Technology, project MAC. Massachusetts Institute of Technology.

  16. Kellerer, H., & Kotov, V. (2013). An efficient algorithm for bin stretching. Operations Research Letters, 41(4), 343–346.

    Article  Google Scholar 

  17. Kellerer, H., Kotov, V., Speranza, M. G., & Tuza, Z. (1997). Semi on-line algorithms for the partition problem. Operations Research Letters, 21, 235–242.

    Article  Google Scholar 

  18. Ullman, J. (1971). The performance of a memory allocation algorithm. Technical Report 100.

  19. Zobrist, A. L. (1970). A new hashing method with application for game playing. ICCA Journal, 13.2, 69–73.

    Google Scholar 

Download references

Author information

Affiliations

Authors

Corresponding author

Correspondence to Martin Böhm.

Additional information

Supported by the Project 14-10003S of GA ČR and by the GAUK Project 548214.

Appendices

Appendix 1: Linear programs used in the proofs

LP1

figurek

LP2

figurel

LP3

figurem

LP4

figuren

LP5

figureo

Appendix 2: Formal proofs from Sect. 2.4.3

For completeness, we provide full proofs of lemmas in Sect. 2.4.3 which are shown using infeasible linear programs. Recall that these lemmas are parts of the proof of Claim 2.9. We use the notation introduced in Definition 2.10 and Eqs. (1)–(12).

Lemma 5.1

(Lemma 2.11) Assume that no good situation is reached until Step (11). Then it holds that during Step (10), only j is packed into B.

Proof

We first prove that no two additional items \(j_2, j_3\) can be packed into B during Step (10). Assuming the contrary, we get \(s(B_{\leftarrow j_2}) + s(j_2) + s(j_3) > 6 + 2 + 2 = 10\). With that load on B, we consider the packing at the end of Step (10), when the item x arrived. If \(s(x) + s(C_{\leftarrow x}) < 9\), we get GS6 by placing x into C since \(s(A)>3\), so it must be true that \(s(x) + s(C_{\leftarrow x}) > 9\), which means \(s(x) > 5\). This is enough for us to place x into \(B|_{22}\) (where it fits; otherwise, we are in GS7) and reach GS3.

This contradiction gives us that at most one additional item \(j_2\) can be packed into B during Step (10). We will now prove that even \(j_2\) does not exist.

We split the analysis into two cases depending on which \(j_2\) and r arrive first.

Case 1. The item r is packed before \(j_2\), meaning \(s(B_{\leftarrow x}) = s(B_{\leftarrow r}) + s(j_2)\).

We start with inequalities (4), (7) and (10) in the following form:

$$\begin{aligned}&9 + \frac{s(A_{\leftarrow r})}{2}< s(B_{\leftarrow r}) + s(r) \\&s(B_{\leftarrow r}) + s(j_2) + s(x) + s(A_{\leftarrow x})< 15 + \frac{s(r)}{2} \\&s(B_{\leftarrow r}) + s(j_2) < s(A_{\leftarrow x}) + s(x) + \big (4 - s(r)\big ) \end{aligned}$$

We sum twice (4) with (7) and (10):

Using \(s(A_{\leftarrow r}) \ge s(A_{\leftarrow j})\) (r arrives after j) with \(s(A_{\leftarrow j}) > 3\) from Observation 2.4 and \(s(r) < 4\) gives us:

$$\begin{aligned} 3 + 2s(j_2)&< 7 \\ s(j_2)&< 2 \end{aligned}$$

which is a contradiction, since \(s(A_{\leftarrow j_2}) < 4\) and \(j_2\) did not fit into \(A|_{6}\).

Case 2. In the remaining case, \(j_2\) arrives before r, which means

$$\begin{aligned} s(B_{\leftarrow x}) = s(B_{\leftarrow r}) = s(B_{\leftarrow j}) + s(j) + s(j_2). \end{aligned}$$

We start by summing (5) and (7). We get:

$$\begin{aligned}&s(B_{\leftarrow r}) + s(B_{\leftarrow x}) + s(x) + s(r) \nonumber \\&\quad + s(A_{\leftarrow x}) + s(A_{\leftarrow r})< 30 + \frac{s(r)}{2} \nonumber \\&2s(B_{\leftarrow j}) + 2s(j) + 2s(j_2) + s(x) + s(r) \nonumber \\&\quad + s(A_{\leftarrow r}) + s(A_{\leftarrow x}) < 30 + \frac{s(r)}{2}. \end{aligned}$$
(13)

Keeping (13) in mind for later use, we continue by considering (2), (3) and (12) in the following form:

$$\begin{aligned}&s(B_{\leftarrow j}) + s(j) > 6 \end{aligned}$$
(14)
$$\begin{aligned}&s(A_{\leftarrow j_2}) + s(j_2)> 6 \nonumber \\&s(r) + s(x) + (4 - s(A_{\leftarrow x})) > s(B_{\leftarrow x})\nonumber \\&\quad = s(B_{\leftarrow j}) + s(j) + s(j_2) \end{aligned}$$
(15)

Summing the three inequalities gives us:

$$\begin{aligned}&s(B_{\leftarrow j}) + s(j) + s(A_{\leftarrow j_2}) + s(j_2) \nonumber \\&\quad + s(r) + s(x) + (4 - s(A_{\leftarrow x})) \nonumber \\&\quad> 12 + s(B_{\leftarrow j}) + s(j) + s(j_2)\nonumber \\&s(r) + s(x) + \left( s(A_{\leftarrow j_2}) - s(A_{\leftarrow x}) \right)> 8 \nonumber \\&s(r) + s(x) > 8 \end{aligned}$$
(16)

Summing two times (14), two times (15) and once (16) gives us:

$$\begin{aligned} 2s(B_{\leftarrow j}) + 2s(j) + 2s(j_2) + 2s(A_{\leftarrow j_2}) + s(r) + s(x) > 32. \end{aligned}$$
(17)

Using \(s(A_{\leftarrow j_2}) \le s(A_{\leftarrow r}) \le s(A_{\leftarrow x})\) (which is only true here in Case 2, where r arrived later) and recalling (13) along with (17), we get \(30 + s(r)/2 > 32\) and \(s(r) > 4\), which is a contradiction with r fitting into \(C|_4\). \(\square \)

Lemma 5.2

(Lemma 2.12) Suppose that e and r are items as described in Definition 2.10 and suppose also that no good situation was reached during Step (10) of the algorithm Evasive. Then, \(s(e) + s(r) \ge s(B_{\leftarrow j}) + s(r) > 6.8\).

Proof

First of all, it is important to note that the item e may be packed on A or on B. Since either \(B_{\leftarrow j}\), or \(A_{\leftarrow j}\) contains solely e by Observation 2.4, we get that either \(s(B_{\leftarrow j}) = s(e)\), or \(s(B_{\leftarrow j}) \le s(A_{\leftarrow j}) = s(e)\). Thus it is sufficient to prove \(s(B_{\leftarrow j}) + s(r) > 6.8\).

We start the proof of \(s(B_{\leftarrow j}) + s(r) > 6.8\) by restating (4), (8) and (9) in the following form:

$$\begin{aligned} s(B_{\leftarrow j}) + s(j) + s(r)&> 9 + \frac{s(A_{\leftarrow r})}{2} \\ s(B_{\leftarrow j}) + s(j) + s(x)&> 9 + \frac{s(A_{\leftarrow x}) + s(r)}{2} \\ s(B_{\leftarrow j}) + s(j) + (4 - s(r))&> s(A_{\leftarrow x}) + s(x). \end{aligned}$$

Before summing up the inequalities, we multiply the first one by 8, the second by 2 and the third by 2. In total, we have:

$$\begin{aligned}&12s(B_{\leftarrow j}) + 12s(j) + 8 + 6s(r) + 2s(x) \\&\quad > 90 + 3s(A_{\leftarrow x}) + 4s(A_{\leftarrow r})\\&\quad + s(r) + 2s(x). \\ \end{aligned}$$

We know that \(s(B_{\leftarrow j}) \le s(A_{\leftarrow x})\) and \(s(B_{\leftarrow j}) \le s(A_{\leftarrow r})\), allowing us to cancel out the terms:

$$\begin{aligned} 5s(B_{\leftarrow j}) + 5s(r) + 12s(j) > 82. \end{aligned}$$

Finally, using the bound \(s(j) < 4\) and noting that \((82 - 48)/5 = 6.8\), we get

$$\begin{aligned} s(B_{\leftarrow j}) + s(r) > 6.8. \end{aligned}$$

\(\square \)

Lemma 5.3

(Lemma 2.13) Suppose that e and j are items as described in Definition 2.10 and suppose also that no good situation was reached by the algorithm Evasive. Then, \(s(e) + s(j) \ge s(B_{\leftarrow j}) + s(j) > 7.6\).

Proof

The same argument as in Lemma 2.12 gives us \(s(e) + s(j) \ge s(B_{\leftarrow j}) + s(j)\). We therefore aim to prove \(s(B_{\leftarrow j}) + s(j) > 7.6\). Summing up (8) and (11) and using \(s(B_{\leftarrow x}) = s(B_{\leftarrow j}) + s(j)\), we get

$$\begin{aligned}&2s(B_{\leftarrow j}) + 2s(j) + s(x) + 4 - s(A_{\leftarrow x})\\&\quad> 9 + \frac{s(A_{\leftarrow x}) + s(r)}{2} + s(r) + s(x)\\&2s(B_{\leftarrow j}) + 2s(j) > 5 + \frac{3}{2} \big (s(A_{\leftarrow x}) + s(r)\big ). \end{aligned}$$

We now apply the bound \(s(A_{\leftarrow x}) + s(r) \ge s(B_{\leftarrow j}) + s(r) > 6.8\), the second inequality being Lemma 2.12. We get:

$$\begin{aligned} 2s(B_{\leftarrow j})+ 2s(j) > 5+ 10.2, \end{aligned}$$

and finally \(s(B_{\leftarrow j}) + s(j) > 7.6\), completing the proof.\(\square \)

Lemma 5.4

(Lemma 2.16) Suppose the algorithm Evasive reaches no good situation during Step (10). Then, after placing x into B in Step (11), it holds that \(s(B) < 12.8\).

Proof

As before, we will use our inequalities to derive the desired bound. As we have argued above, Lemma 2.12 gives us that \(s(r) > 2.8\).

We sum up inequalities (7) and (11), getting:

$$\begin{aligned}&s(B_{\leftarrow j}) + s(j) + 2s(x) + s(A_{\leftarrow x}) + s(r) \\&\quad< 15 + \frac{s(r)}{2} + s(B_{\leftarrow j})\\&\quad + s(j) + 4 - s(A_{\leftarrow x})\\&2s(x) + 2s(A_{\leftarrow x})< 19 - \frac{s(r)}{2}. \\&s(x) + s(A_{\leftarrow x}) < 9.5 - \frac{s(r)}{4}. \end{aligned}$$

To finish the bound, we need \(s(B_{\leftarrow j}) \le s(A_{\leftarrow j}) \le s(A_{\leftarrow x})\) [this is true because we reorder the bins B, A in Step (2)], \(s(r) > 2.8\) and \(s(j) < 4\). Plugging them in, we get:

$$\begin{aligned} s(B)= & {} s(B_{\leftarrow j}) + s(j) + s(x) \le s(A_{\leftarrow x}) + s(j) + s(x)\\< & {} 9.5 - \frac{s(r)}{4} + s(j)< 9.5 - 0.7 + 4 < 12.8. \end{aligned}$$

\(\square \)

Appendix 3: Lower bound of 45/33

The lower bound of 45/33 for three bins is presented as Figs. 2, 3, 4 and 5.

Fig. 2
figure2

The beginning moves of the 45/33 lower bound, scaled so that \(T = 33\) and \(S = 45\). The vertices contain the current loads of all three bins and a string n: i with i being the next item presented by the Adversary. If there are several numbers after n:, the items are presented in the given order, regardless of packing by the player Algorithm. The coloured vertices are expanded in later figures

Fig. 3
figure3

Game tree for the lower bound of 45/33, starting with the bin configuration \((6,0,0,\{4,1,1\})\)

Fig. 4
figure4

Game tree for the lower bound of 45/33, starting with the bin configuration \((5,1,0,\{4,1,1\})\)

Fig. 5
figure5

Game tree for the lower bound of 45/33, starting with the bin configuration \((4,2,0,\{4,1,1\})\)

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Böhm, M., Sgall, J., van Stee, R. et al. Online bin stretching with three bins. J Sched 20, 601–621 (2017). https://doi.org/10.1007/s10951-016-0504-y

Download citation

Keywords

  • Online algorithms
  • Semi-online algorithms
  • Semi-online scheduling
  • Bin stretching
  • Bin packing
  • Lower bounds for online algorithms
  • Game tree search