Abstract
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.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.