Faster 0-1-Knapsack via Near-Convex Min-Plus-Convolution

Authors Karl Bringmann, Alejandro Cassis



PDF
Thumbnail PDF

File

LIPIcs.ESA.2023.24.pdf
  • Filesize: 1.18 MB
  • 16 pages

Document Identifiers

Author Details

Karl Bringmann
  • Saarland University, Saarland Informatics Campus, Saarbrücken, Germany
  • Max Planck Institute for Informatics, Saarland Informatics Campus, Saarbrücken, Germany
Alejandro Cassis
  • Saarland University, Saarland Informatics Campus, Saarbrücken, Germany
  • Max Planck Institute for Informatics, Saarland Informatics Campus, Saarbrücken, Germany

Cite AsGet BibTex

Karl Bringmann and Alejandro Cassis. Faster 0-1-Knapsack via Near-Convex Min-Plus-Convolution. In 31st Annual European Symposium on Algorithms (ESA 2023). Leibniz International Proceedings in Informatics (LIPIcs), Volume 274, pp. 24:1-24:16, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2023)
https://doi.org/10.4230/LIPIcs.ESA.2023.24

Abstract

We revisit the classic 0-1-Knapsack problem, in which we are given n items with their weights and profits as well as a weight budget W, and the goal is to find a subset of items of total weight at most W that maximizes the total profit. We study pseudopolynomial-time algorithms parameterized by the largest profit of any item p_{max}, and the largest weight of any item w_max. Our main result are algorithms for 0-1-Knapsack running in time Õ(n w_max p_max^{2/3}) and Õ(n p_max w_max^{2/3}), improving upon an algorithm in time O(n p_max w_max) by Pisinger [J. Algorithms '99]. In the regime p_max ≈ w_max ≈ n (and W ≈ OPT ≈ n²) our algorithms are the first to break the cubic barrier n³. To obtain our result, we give an efficient algorithm to compute the min-plus convolution of near-convex functions. More precisely, we say that a function f : [n] ↦ ℤ is Δ-near convex with Δ ≥ 1, if there is a convex function f ̆ such that f ̆(i) ≤ f(i) ≤ f ̆(i) + Δ for every i. We design an algorithm computing the min-plus convolution of two Δ-near convex functions in time Õ(nΔ). This tool can replace the usage of the prediction technique of Bateni, Hajiaghayi, Seddighin and Stein [STOC '18] in all applications we are aware of, and we believe it has wider applicability.

Subject Classification

ACM Subject Classification
  • Theory of computation → Design and analysis of algorithms
Keywords
  • Knapsack
  • Fine-Grained Complexity
  • Min-Plus Convolution

Metrics

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

References

  1. Alok Aggarwal, Maria M. Klawe, Shlomo Moran, Peter W. Shor, and Robert E. Wilber. Geometric applications of a matrix-searching algorithm. Algorithmica, 2:195-208, 1987. URL: https://doi.org/10.1007/BF01840359.
  2. Kyriakos Axiotis, Arturs Backurs, Karl Bringmann, Ce Jin, Vasileios Nakos, Christos Tzamos, and Hongxun Wu. Fast and simple modular subset sum. In SOSA, pages 57-67. SIAM, 2021. URL: https://doi.org/10.1137/1.9781611976496.6.
  3. Kyriakos Axiotis and Christos Tzamos. Capacitated dynamic programming: Faster Knapsack and graph algorithms. In ICALP, volume 132 of LIPIcs, pages 19:1-19:13. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2019. URL: https://doi.org/10.4230/LIPIcs.ICALP.2019.19.
  4. MohammadHossein Bateni, MohammadTaghi Hajiaghayi, Saeed Seddighin, and Cliff Stein. Fast algorithms for knapsack via convolution and prediction. In STOC, pages 1269-1282. ACM, 2018. URL: https://doi.org/10.1145/3188745.3188876.
  5. Richard Bellman. Dynamic Programming. Princeton University Press, Princeton, NJ, USA, 1957. URL: https://doi.org/10.2307/j.ctv1nxcw0f.
  6. David Bremner, Timothy M. Chan, Erik D. Demaine, Jeff Erickson, Ferran Hurtado, John Iacono, Stefan Langerman, Mihai Patrascu, and Perouz Taslakian. Necklaces, convolutions, and X+Y. Algorithmica, 69(2):294-314, 2014. URL: https://doi.org/10.1007/s00453-012-9734-3.
  7. Karl Bringmann. A near-linear pseudopolynomial time algorithm for subset sum. In SODA, pages 1073-1084. SIAM, 2017. URL: https://doi.org/10.1137/1.9781611974782.69.
  8. Karl Bringmann and Alejandro Cassis. Faster knapsack algorithms via bounded monotone min-plus-convolution. In ICALP, volume 229 of LIPIcs, pages 31:1-31:21. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2022. URL: https://doi.org/10.4230/LIPIcs.ICALP.2022.31.
  9. Karl Bringmann, Nick Fischer, and Vasileios Nakos. Sparse nonnegative convolution is equivalent to dense nonnegative convolution. In STOC, pages 1711-1724. ACM, 2021. URL: https://doi.org/10.1145/3406325.3451090.
  10. Karl Bringmann, Nick Fischer, and Vasileios Nakos. Deterministic and las vegas algorithms for sparse nonnegative convolution. In SODA, pages 3069-3090. SIAM, 2022. URL: https://doi.org/10.1137/1.9781611977073.119.
  11. Karl Bringmann and Vasileios Nakos. A fine-grained perspective on approximating subset sum and partition. In SODA, pages 1797-1815. SIAM, 2021. URL: https://doi.org/10.1137/1.9781611976465.108.
  12. Karl Bringmann and Philip Wellnitz. On near-linear-time algorithms for dense subset sum. In SODA, pages 1777-1796. SIAM, 2021. URL: https://doi.org/10.1137/1.9781611976465.107.
  13. Michael R. Bussieck, Hannes Hassler, Gerhard J. Woeginger, and Uwe T. Zimmermann. Fast algorithms for the maximum convolution problem. Oper. Res. Lett., 15(3):133-141, 1994. URL: https://doi.org/10.1016/0167-6377(94)90048-5.
  14. Timothy M. Chan. Approximation schemes for 0-1 knapsack. In SOSA, volume 61 of OASIcs, pages 5:1-5:12. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2018. URL: https://doi.org/10.4230/OASIcs.SOSA.2018.5.
  15. Timothy M. Chan and Qizheng He. More on change-making and related problems. J. Comput. Syst. Sci., 124:159-169, 2022. URL: https://doi.org/10.1016/j.jcss.2021.09.005.
  16. Timothy M. Chan and Moshe Lewenstein. Clustered integer 3sum via additive combinatorics. In STOC, pages 31-40. ACM, 2015. URL: https://doi.org/10.1145/2746539.2746568.
  17. Timothy M. Chan and R. Ryan Williams. Deterministic APSP, orthogonal vectors, and more: Quickly derandomizing Razborov-Smolensky. ACM Trans. Algorithms, 17(1):2:1-2:14, 2021. URL: https://doi.org/10.1145/3402926.
  18. Shucheng Chi, Ran Duan, Tianle Xie, and Tianyi Zhang. Faster min-plus product for monotone instances. In STOC, pages 1529-1542. ACM, 2022. URL: https://doi.org/10.1145/3519935.3520057.
  19. Richard Cole and Ramesh Hariharan. Verifying candidate matches in sparse and wildcard matching. In STOC, pages 592-601. ACM, 2002. URL: https://doi.org/10.1145/509907.509992.
  20. Marek Cygan, Marcin Mucha, Karol Wegrzycki, and Michal Wlodarczyk. On problems equivalent to (min, +)-convolution. ACM Trans. Algorithms, 15(1):14:1-14:25, 2019. URL: https://doi.org/10.1145/3293465.
  21. Mingyang Deng, Ce Jin, and Xiao Mao. Approximating knapsack and partition via dense subset sums. In SODA, pages 2961-2979. SIAM, 2023. URL: https://doi.org/10.1137/1.9781611977554.ch113.
  22. Mingyang Deng, Xiao Mao, and Ziqian Zhong. On problems related to unbounded subsetsum: A unified combinatorial approach. In SODA, pages 2980-2990. SIAM, 2023. URL: https://doi.org/10.1137/1.9781611977554.ch114.
  23. Friedrich Eisenbrand and Robert Weismantel. Proximity results and faster algorithms for integer programming using the steinitz lemma. In SODA, pages 808-816. SIAM, 2018. URL: https://doi.org/10.1137/1.9781611975031.52.
  24. Pascal Giorgi, Bruno Grenet, and Armelle Perret du Cray. Essentially optimal sparse polynomial multiplication. In ISSAC, pages 202-209. ACM, 2020. URL: https://doi.org/10.1145/3373207.3404026.
  25. Ronald L. Graham. An efficient algorithm for determining the convex hull of a finite planar set. Inf. Process. Lett., 1(4):132-133, 1972. URL: https://doi.org/10.1016/0020-0190(72)90045-2.
  26. Klaus Jansen and Lars Rohwedder. On integer programming and convolution. In ITCS, volume 124 of LIPIcs, pages 43:1-43:17. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2019. URL: https://doi.org/10.4230/LIPIcs.ITCS.2019.43.
  27. Ce Jin and Hongxun Wu. A simple near-linear pseudopolynomial time randomized algorithm for subset sum. In SOSA, volume 69 of OASIcs, pages 17:1-17:6. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2019. URL: https://doi.org/10.4230/OASIcs.SOSA.2019.17.
  28. Hans Kellerer and Ulrich Pferschy. Improved dynamic programming in connection with an FPTAS for the knapsack problem. J. Comb. Optim., 8(1):5-11, 2004. URL: https://doi.org/10.1023/B:JOCO.0000021934.29833.6b.
  29. Hans Kellerer, Ulrich Pferschy, and David Pisinger. Knapsack problems. Springer, 2004. URL: https://doi.org/10.1007/978-3-540-24777-7.
  30. Kim-Manuel Klein. On the fine-grained complexity of the unbounded subsetsum and the frobenius problem. In SODA, pages 3567-3582. SIAM, 2022. URL: https://doi.org/10.1137/1.9781611977073.141.
  31. Konstantinos Koiliaris and Chao Xu. Faster pseudopolynomial time algorithms for subset sum. ACM Trans. Algorithms, 15(3):40:1-40:20, 2019. URL: https://doi.org/10.1145/3329863.
  32. Marvin Künnemann, Ramamohan Paturi, and Stefan Schneider. On the fine-grained complexity of one-dimensional dynamic programming. In ICALP, volume 80 of LIPIcs, pages 21:1-21:15. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2017. URL: https://doi.org/10.4230/LIPIcs.ICALP.2017.21.
  33. Vasileios Nakos. Nearly optimal sparse polynomial multiplication. IEEE Trans. Inf. Theory, 66(11):7231-7236, 2020. URL: https://doi.org/10.1109/TIT.2020.2989385.
  34. David Pisinger. Linear time algorithms for Knapsack problems with bounded weights. J. Algorithms, 33(1):1-14, 1999. URL: https://doi.org/10.1006/jagm.1999.1034.
  35. Adam Polak, Lars Rohwedder, and Karol Wegrzycki. Knapsack and Subset Sum with small items. In ICALP, volume 198 of LIPIcs, pages 106:1-106:19. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2021. URL: https://doi.org/10.4230/LIPIcs.ICALP.2021.106.
  36. R. Ryan Williams. Faster All-Pairs Shortest Paths via circuit complexity. SIAM J. Comput., 47(5):1965-1985, 2018. URL: https://doi.org/10.1137/15M1024524.
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail