Solving Packing Problems with Few Small Items Using Rainbow Matchings

Authors Max Bannach , Sebastian Berndt , Marten Maack , Matthias Mnich , Alexandra Lassota , Malin Rau , Malte Skambath

Thumbnail PDF


  • Filesize: 0.51 MB
  • 14 pages

Document Identifiers

Author Details

Max Bannach
  • Institute for Theoretical Computer Science, Universität zu Lübeck, Germany
Sebastian Berndt
  • Institute for IT Security, Universität zu Lübeck, Germany
Marten Maack
  • Department of Computer Science, Universität Kiel, Germany
Matthias Mnich
  • Institut für Algorithmen und Komplexität, TU Hamburg, Germany
Alexandra Lassota
  • Department of Computer Science, Universität Kiel, Germany
Malin Rau
  • Université Grenoble Alpes, CNRS, Inria, Grenoble INP, LIG, France
Malte Skambath
  • Department of Computer Science, Universität Kiel, Germany


We want to thank Magnus Wahlström for helpful discussions.

Cite AsGet BibTex

Max Bannach, Sebastian Berndt, Marten Maack, Matthias Mnich, Alexandra Lassota, Malin Rau, and Malte Skambath. Solving Packing Problems with Few Small Items Using Rainbow Matchings. In 45th International Symposium on Mathematical Foundations of Computer Science (MFCS 2020). Leibniz International Proceedings in Informatics (LIPIcs), Volume 170, pp. 11:1-11:14, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2020)


An important area of combinatorial optimization is the study of packing and covering problems, such as Bin Packing, Multiple Knapsack, and Bin Covering. Those problems have been studied extensively from the viewpoint of approximation algorithms, but their parameterized complexity has only been investigated barely. For problem instances containing no "small" items, classical matching algorithms yield optimal solutions in polynomial time. In this paper we approach them by their distance from triviality, measuring the problem complexity by the number k of small items. Our main results are fixed-parameter algorithms for vector versions of Bin Packing, Multiple Knapsack, and Bin Covering parameterized by k. The algorithms are randomized with one-sided error and run in time 4^k⋅ k!⋅ n^{O(1)}. To achieve this, we introduce a colored matching problem to which we reduce all these packing problems. The colored matching problem is natural in itself and we expect it to be useful for other applications. We also present a deterministic fixed-parameter algorithm for Bin Covering with run time O((k!)² ⋅ k ⋅ 2^k ⋅ n log(n)).

Subject Classification

ACM Subject Classification
  • Theory of computation → Fixed parameter tractability
  • Bin Packing
  • Knapsack
  • matching
  • fixed-parameter tractable


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. N. Alon, Y. Azar, J. Csirik, L. Epstein, S. V. Sevastianov, A. P. A. Vestjens, and G. J. Woeginger. On-line and off-line approximation algorithms for vector covering problems. Algorithmica, 21(1):104-118, 1998. Google Scholar
  2. L. Babel, B. Chen, H. Kellerer, and V. Kotov. Algorithms for on-line bin-packing problems with cardinality constraints. Discrete Appl. Math., 143(1-3):238-251, 2004. Google Scholar
  3. N. Bansal, M. Eliás, and A. Khan. Improved approximation for vector bin packing. In Proc. SODA 2016, pages 1561-1579, 2016. Google Scholar
  4. H. I. Christensen, A. Khan, S. Pokutta, and P. Tetali. Approximation and online algorithms for multidimensional bin packing: A survey. Comput. Sci. Rev., 24:63-79, 2017. Google Scholar
  5. J. Csirik, J. B. G. Frenk, M. Labbé, and S. Zhang. On the multidimensional vector bin packing. Acta Cybern., 9(4):361-369, 1990. Google Scholar
  6. M. Cygan, F. V. Fomin, Ł. Kowalik, D. Lokshtanov, D. Marx, M. Pilipczuk, M. Pilipczuk, and S. Saurabh. Parameterized algorithms. Springer, 2015. Google Scholar
  7. L. Epstein, L. M. Favrholdt, and A. Levin. Online variable-sized bin packing with conflicts. Discrete Opt., 8(2):333-343, 2011. Google Scholar
  8. L. Epstein, A. Levin, and R. van Stee. Approximation schemes for packing splittable items with cardinality constraints. Algorithmica, 62(1-2):102-129, 2012. Google Scholar
  9. S. Fafianie and S. Kratsch. A shortcut to (sun)flowers: Kernels in logarithmic space or linear time. In Proc. MFCS 2015, volume 9235 of Lecture Notes Comput. Sci., 2015. Google Scholar
  10. M. R. Garey, R. L. Graham, D. S. Johnson, and A. C. Yao. Resource constrained scheduling as generalized bin packing. J. Combinatorial Theory, Ser. A, 21(3):257-298, 1976. Google Scholar
  11. M. R. Garey and D. S. Johnson. Approximation algorithms for bin packing problems: A survey. In Analysis and design of algorithms in combinatorial optimization. Springer, 1981. Google Scholar
  12. S. Geng and L. Zhang. The complexity of the 0/1 multi-knapsack problem. J. Comput. Sci. Tech., 1(1):46-50, 1986. Google Scholar
  13. M. X. Goemans and T. Rothvoß. Polynomiality for bin packing with a constant number of item types. In Proc. SODA 2014, pages 830-839, 2014. Google Scholar
  14. T. F. Gonzalez. Handbook of approximation algorithms and metaheuristics. Chapman and Hall/CRC, 2007. Google Scholar
  15. J. Guo, F. Hüffner, and R. Niedermeier. A structural view on parameterizing problems: Distance from triviality. In Proc. IWPEC 2004, volume 3162 of Lecture Notes Comput. Science, pages 162-173, 2004. Google Scholar
  16. G. Z. Gutin, M. Wahlström, and A. Yeo. Rural postman parameterized by the number of components of required edges. J. Comput. Syst. Sci., 83(1):121-131, 2017. Google Scholar
  17. R. Hoberg and T. Rothvoß. A logarithmic additive integrality gap for bin packing. In Proc. SODA 2017, pages 2616-2625, 2017. Google Scholar
  18. K. Jansen and K. Klein. About the structure of the integer cone and its application to bin packing. In Proc. SODA 2017, pages 1571-1581, 2017. Google Scholar
  19. K. Jansen, S. Kratsch, D. Marx, and I. Schlotter. Bin packing with fixed number of bins revisited. J. Comput. Syst. Sci., 79(1):39-49, 2013. Google Scholar
  20. K. Jansen and R. Solis-Oba. A polynomial time OPT + 1 algorithm for the cutting stock problem with a constant number of object lengths. Math. Oper. Res., 36(4):743-753, 2011. Google Scholar
  21. M. Kano and X. Li. Monochromatic and heterochromatic subgraphs in edge-colored graphs-A survey. Graphs and Combinatorics, 24(4):237-263, 2008. Google Scholar
  22. H. Kellerer, U. Pferschy, and D. Pisinger. Knapsack Problems. Springer, 2004. Google Scholar
  23. C. Kenyon. Best-fit bin-packing with random order. In Proc. SODA 1996, 1996. Google Scholar
  24. J. Kuipers. Bin packing games. Math. Meth. Oper. Res., 47(3):499-510, 1998. Google Scholar
  25. V. B. Le and F. Pfender. Complexity results for rainbow matchings. Theor. Comput. Sci., 524:27-33, 2014. Google Scholar
  26. S. Martello and P. Toth. Knapsack problems. Wiley-Interscience Series in Discrete Mathematics and Optimization. John Wiley & Sons, Ltd., Chichester, 1990. Algorithms and computer implementations. Google Scholar
  27. D. Marx and M. Pilipczuk. Everything you always wanted to know about the parameterized complexity of subgraph isomorphism (but were afraid to ask). In Proc. STACS 2014, volume 25 of Leibniz Int. Proc. Informatics, pages 542-553, 2014. Google Scholar
  28. S. Th. McCormick, S. R. Smallwood, and F. C. R. Spieksma. A polynomial algorithm for multiprocessor scheduling with two job lengths. In Proc. SODA 1997, pages 509–-517, 1997. Google Scholar
  29. S. Th. McCormick, S. R. Smallwood, and F. C. R. Spieksma. A polynomial algorithm for multiprocessor scheduling with two job lengths. Math. Oper. Res., 26(1):31-49, 2001. Google Scholar
  30. M. Mnich and R. van Bevern. Parameterized complexity of machine scheduling: 15 open problems. Comput. & OR, 100:254-261, 2018. Google Scholar
  31. K. Mulmuley, U. V. Vazirani, and V. V. Vazirani. Matching is as easy as matrix inversion. Combinatorica, 7(1):105-113, 1987. Google Scholar
  32. R. Niedermeier. Invitation to Fixed-Parameter Algorithms. Oxford University Press, 2006. Google Scholar
  33. R. Niedermeier and P. Rossmanith. An efficient fixed-parameter algorithm for 3-hitting set. J. Discrete Algorithms, 1(1):89-102, 2003. Google Scholar
  34. P. W. Shor. Random planar matching and bin packing. PhD thesis, Massachusetts Institute of Technology, Department of Mathematics, 1985. Google Scholar
  35. P. W. Shor. The average-case analysis of some on-line algorithms for bin packing. Combinatorica, 6(2):179-200, 1986. Google Scholar
  36. M. Sorge, R. van Bevern, R. Niedermeier, and M. Weller. A new view on rural postman based on Eulerian extension and matching. J. Discrete Algorithms, 16:12-33, 2012. Google Scholar
  37. R. van Bevern. Towards optimal and expressive kernelization for d-hitting set. Algorithmica, 70(1):129-147, 2014. Google Scholar
  38. G. J. Woeginger. There is no asymptotic PTAS for two-dimensional vector packing. Inf. Process. Lett., 64(6):293-297, 1997. Google Scholar