Colored Bin Packing: Online Algorithms and Lower Bounds

In the Colored Bin Packing problem a sequence of items of sizes up to 1 arrives to be packed into bins of unit capacity. Each item has one of at least two colors and an additional constraint is that we cannot pack two items of the same color next to each other in the same bin. The objective is to minimize the number of bins. In the important special case when all items have size zero, we characterize the optimal value to be equal to color discrepancy. As our main result, we give an (asymptotically) 1.5-competitive algorithm which is optimal. In fact, the algorithm always uses at most $$\lceil 1.5\cdot OPT \rceil $$⌈1.5·OPT⌉ bins and we can force any deterministic online algorithm to use at least $$\lceil 1.5\cdot OPT \rceil $$⌈1.5·OPT⌉ bins while the offline optimum is $$ OPT $$OPT for any value of $$ OPT \ge 2$$OPT≥2. In particular, the absolute competitive ratio of our algorithm is 5 / 3 and this is optimal. For items of arbitrary size we give a lower bound of 2.5 on the asymptotic competitive ratio of any online algorithm and an absolutely 3.5-competitive algorithm. When the items have sizes of at most 1 / d for a real $$d \ge 2$$d≥2 the asymptotic competitive ratio of our algorithm is $$1.5+d/(d-1)$$1.5+d/(d-1). We also show that classical algorithms First Fit, Best Fit and Worst Fit are not constant competitive, which holds already for three colors and small items. In the case of two colors—the Black and White Bin Packing problem—we give a lower bound of 2 on the asymptotic competitive ratio of any online algorithm when items have arbitrary size. We also prove that all Any Fit algorithms have the absolute competitive ratio 3. When the items have sizes of at most 1 / d for a real $$d \ge 2$$d≥2 we show that the Worst Fit algorithm is absolutely $$(1+d/(d-1))$$(1+d/(d-1))-competitive.

[1]  David S. Johnson,et al.  Bounded Space On-Line Bin Packing: Best Is Better than First , 1991, SODA '91.

[2]  Zsolt Tuza,et al.  Black and White Bin Packing , 2012, WAOA.

[3]  Steven S. Seiden,et al.  On the online bin packing problem , 2001, JACM.

[4]  Jirí Sgall,et al.  The optimal absolute ratio for online bin packing , 2015, SODA.

[5]  Herb Schwetman,et al.  Analysis of Several Task-Scheduling Algorithms for a Model of Multiprogramming Computer Systems , 1975, JACM.

[6]  József Békési,et al.  New lower bounds for certain classes of bin packing algorithms , 2010, Theor. Comput. Sci..

[7]  Jeffrey D. Ullman,et al.  The performance of a memory allocation algorithm , 1971 .

[8]  Zsolt Tuza,et al.  Online Results for Black and White Bin Packing , 2014, Theory of Computing Systems.

[9]  Jirí Sgall,et al.  Optimal Analysis of Best Fit Bin Packing , 2014, ICALP.

[10]  Prabhu Manyem Bin packing and covering with longest items at the bottom: online version , 2002 .

[11]  Luke Finlay,et al.  Online LIB problems: Heuristics for Bin Covering and lower bounds for Bin Packing , 2005, RAIRO Oper. Res..

[12]  D. T. Lee,et al.  A simple on-line bin-packing algorithm , 1985, JACM.

[13]  Zsolt Tuza,et al.  Bin packing with “Largest In Bottom” constraint: tighter bounds and generalizations , 2013, J. Comb. Optim..

[14]  Leah Epstein,et al.  Colorful Bin Packing , 2014, SWAT.

[15]  Leah Epstein,et al.  Online bin packing with cardinality constraints revisited , 2014, ArXiv.

[16]  尾内 理紀夫 Analysis of Several Task-Scheduling Algorithms for a Model of Multiprogramming Computer Systems , 1976 .

[17]  Daniele Vigo,et al.  Bin packing approximation algorithms: Survey and classification , 2013 .

[18]  L. Epstein On online bin packing with LIB constraints , 2009 .

[19]  Prabhu Manyem,et al.  Approximation Lower Bounds in Online LIB Bin Packing and Covering , 2003, J. Autom. Lang. Comb..

[20]  Hiroshi Fujiwara,et al.  Improved Lower Bounds for the Online Bin Packing Problem with Cardinality Constraints , 2013, COCOON.

[21]  David S. Johnson,et al.  Near-optimal bin packing algorithms , 1973 .

[22]  Hans Kellerer,et al.  Algorithms for on-line bin-packing problems with cardinality constraints , 2004, Discret. Appl. Math..

[23]  Marek Chrobak,et al.  Two-Bounded-Space Bin Packing Revisited , 2011, ESA.

[24]  Jirí Sgall,et al.  Online Colored Bin Packing , 2014, WAOA.

[25]  Leah Epstein Online Bin Packing with Cardinality Constraints , 2006, SIAM J. Discret. Math..

[26]  Jirí Sgall,et al.  First Fit bin packing: A tight analysis , 2013, STACS.