Colored Bin Packing: Online Algorithms and Lower Bounds
- 377 Downloads
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 \) bins and we can force any deterministic online algorithm to use at least \(\lceil 1.5\cdot OPT \rceil \) bins while the offline optimum is \( OPT \) for any value of \( OPT \ge 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\) the asymptotic competitive ratio of our algorithm is \(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\) we show that the Worst Fit algorithm is absolutely \((1+d/(d-1))\)-competitive.
KeywordsOnline algorithms Bin packing Worst-case analysis Colored bin packing Black and white bin packing
We would like to thank anonymous reviewers for careful reading and many useful suggestions.
- 3.Balogh, J., Békési, J., Dósa, G., Kellerer, H., Tuza, Z.: Black and white bin packing. In: Approximation and Online Algorithms. LNCS, vol. 7846, pp. 131–144. Springer, Berlin (2013)Google Scholar
- 5.Balogh, J., Békési, J., Dósa, G., Sgall, J., van Stee, R.: The optimal absolute ratio for online bin packing. In: Proceedings of the 26th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pp 1425–1438. ACM-SIAM (2015)Google Scholar
- 6.Böhm, M., Sgall, J., Veselý, P.: Online colored bin packing. In: Approximation and Online Algorithms. LNCS, vol. 8952, pp. 35–46. Springer, Berlin (2015)Google Scholar
- 7.Chrobak, M., Sgall, J., Woeginger, G.J.: Two-bounded-space bin packing revisited. In: European Symposium on Algorithms (ESA). LNCS, vol. 6942, pp. 263–274. Springer, Berlin (2011)Google Scholar
- 10.Dósa, G., Epstein, L.: Colorful bin packing. In: Algorithm Theory SWAT. LNCS, vol. 8503, pp. 170–181. Springer, Berlin (2014)Google Scholar
- 11.Dósa, G., Epstein, L.: Online bin packing with cardinality constraints revisited. arXiv:1404.1056
- 12.Dósa, G., Sgall, J.: First Fit bin packing: A tight analysis. 30th International Symposium on Theoretical Aspects of Computer Science (STACS), Volume 20 of Leibniz International Proceedings in Informatics (LIPIcs), pp. 538–549. Dagstuhl, Germany (2013)Google Scholar
- 13.Dósa, G., Sgall, J.: Optimal analysis of Best Fit bin packing. In: Automata, Languages, and Programming (ICALP). LNCS, vol. 8572, pp. 429–441. Springer, Berlin (2014)Google Scholar
- 18.Fujiwara, H., Kobayashi, K.: Improved lower bounds for the online bin packing problem with cardinality constraints. In: Computing and Combinatorics, LNCS, vol. 7936, pp. 518–530. Springer, Berlin (2013)Google Scholar
- 19.Johnson, D.: Near-Optimal Bin Packing Algorithms. Massachusetts Institute of Technology, Project MAC. Massachusetts Institute of Technology (1973)Google Scholar
- 25.Ullman, J.: The Performance of a Memory Allocation Algorithm. Technical Report 100 (1971)Google Scholar