Knapsack with Small Items in Near-Quadratic Time (2308.03075v3)
Abstract: The Knapsack problem is one of the most fundamental NP-complete problems at the intersection of computer science, optimization, and operations research. A recent line of research worked towards understanding the complexity of pseudopolynomial-time algorithms for Knapsack parameterized by the maximum item weight $w_{\mathrm{max}}$ and the number of items $n$. A conditional lower bound rules out that Knapsack can be solved in time $O((n+w_{\mathrm{max}}){2-\delta})$ for any $\delta > 0$ [Cygan, Mucha, Wegrzycki, Wlodarczyk'17, K\"unnemann, Paturi, Schneider'17]. This raised the question whether Knapsack can be solved in time $\tilde O((n+w_{\mathrm{max}})2)$. This was open both for 0-1-Knapsack (where each item can be picked at most once) and Bounded Knapsack (where each item comes with a multiplicity). The quest of resolving this question lead to algorithms that solve Bounded Knapsack in time $\tilde O(n3 w_{\mathrm{max}}2)$ [Tamir'09], $\tilde O(n2 w_{\mathrm{max}}2)$ and $\tilde O(n w_{\mathrm{max}}3)$ [Bateni, Hajiaghayi, Seddighin, Stein'18], $O(n2 w_{\mathrm{max}}2)$ and $\tilde O(n w_{\mathrm{max}}2)$ [Eisenbrand and Weismantel'18], $O(n + w_{\mathrm{max}}3)$ [Polak, Rohwedder, Wegrzycki'21], and very recently $\tilde O(n + w_{\mathrm{max}}{12/5})$ [Chen, Lian, Mao, Zhang'23]. In this paper we resolve this question by designing an algorithm for Bounded Knapsack with running time $\tilde O(n + w_{\mathrm{max}}2)$, which is conditionally near-optimal. This resolves the question both for the classic 0-1-Knapsack problem and for the Bounded Knapsack problem.
- Seth-based lower bounds for subset sum and bicriteria path. ACM Trans. Algorithms, 18(1):6:1–6:22, 2022.
- Geometric applications of a matrix-searching algorithm. Algorithmica, 2:195–208, 1987.
- Capacitated dynamic programming: Faster Knapsack and graph algorithms. In ICALP, volume 132 of LIPIcs, pages 19:1–19:13, 2019.
- Fast algorithms for knapsack via convolution and prediction. In STOC, pages 1269–1282. ACM, 2018.
- Richard E. Bellman. Dynamic Programming. Princeton University Press, 1957.
- Necklaces, convolutions, and X+Y. Algorithmica, 69(2):294–314, 2014.
- Karl Bringmann. A near-linear pseudopolynomial time algorithm for Subset Sum. In SODA, pages 1073–1084. SIAM, 2017.
- Faster knapsack algorithms via bounded monotone min-plus-convolution. In ICALP, volume 229 of LIPIcs, pages 31:1–31:21, 2022.
- Faster 0-1-knapsack via near-convex min-plus-convolution. In ESA, LIPIcs, 2023.
- A fine-grained perspective on approximating Subset Sum and Partition. In SODA, pages 1797–1815. SIAM, 2021.
- On near-linear-time algorithms for dense subset sum. In SODA, pages 1777–1796. SIAM, 2021.
- Mark Chaimovich. New algorithm for dense subset-sum problem. Astérisque, 258:363–373, 1999.
- Solving dense subset-sum problems by using analytical number theory. J. Complex., 5(3):271–282, 1989.
- Timothy M. Chan. Approximation schemes for 0-1 Knapsack. In SOSA@SODA, volume 61 of OASICS, pages 5:1–5:12, 2018.
- More on change-making and related problems. J. Comput. Syst. Sci., 124:159–169, 2022.
- Faster algorithms for bounded knapsack and bounded subset sum via fine-grained proximity results. CoRR, abs/2307.12582, 2023.
- Subset sums, completeness and colorings. arXiv preprint arXiv:2104.14766, 2021.
- On problems equivalent to (min,+)-convolution. ACM Trans. Algorithms, 15(1):14:1–14:25, 2019.
- Approximating knapsack and partition via dense subset sums. In SODA, pages 2961–2979. SIAM, 2023.
- Proximity results and faster algorithms for integer programming using the Steinitz lemma. ACM Trans. Algorithms, 16(1):5:1–5:14, 2020.
- Gregory Freiman. New analytical results in subset-sum problem. Discret. Math., 114(1-3):205–217, 1993.
- Gregory A. Freiman. On extremal additive problems of Paul Erdős. Ars Combinatoria, 26:93–114, 1988.
- An almost linear-time algorithm for the dense subset-sum problem. SIAM J. Comput., 20(6):1157–1189, 1991.
- An almost linear-time algorithm for the dense subset-sum problem. In ICALP, volume 510 of LNCS, pages 719–727, 1991.
- On integer programming and convolution. In ITCS, volume 124 of LIPIcs, pages 43:1–43:17, 2019.
- Ce Jin. An improved FPTAS for 0-1 Knapsack. In ICALP, volume 132 of LIPIcs, pages 76:1–76:14, 2019.
- Ce Jin. 0-1 knapsack in nearly quadratic time. CoRR, abs/2308.04093, 2023.
- Ce Jin. Solving knapsack with small items via ℓ0subscriptℓ0\ell_{0}roman_ℓ start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT-proximity. CoRR, abs/2307.09454, 2023.
- Ce Jin and Hongxun Wu. A simple near-linear pseudopolynomial time randomized algorithm for Subset Sum. In SOSA@SODA, volume 69 of OASICS, pages 17:1–17:6, 2019.
- Richard M. Karp. Reducibility among combinatorial problems. In Complexity of Computer Computations, The IBM Research Symposia Series, pages 85–103. Plenum Press, New York, 1972.
- Improved dynamic programming in connection with an FPTAS for the knapsack problem. J. Comb. Optim., 8(1):5–11, 2004.
- Knapsack Problems. Springer, 2004.
- On the fine-grained complexity of one-dimensional dynamic programming. In ICALP, volume 80 of LIPIcs, pages 21:1–21:15, 2017.
- A subquadratic approximation scheme for Partition. In SODA, pages 70–88. SIAM, 2019.
- David Pisinger. Linear time algorithms for knapsack problems with bounded weights. J. Algorithms, 33(1):1–14, 1999.
- Knapsack and subset sum with small items. In ICALP, volume 198 of LIPIcs, pages 106:1–106:19, 2021.
- András Sárközy. Finite Addition Theorems, II. Journal of Number Theory, 48(2):197–218, 1994.
- Finite and infinite arithmetic progressions in sumsets. Annals of Mathematics, pages 1–35, 2006.
- Arie Tamir. New pseudopolynomial complexity bounds for the bounded and other integer knapsack related problems. Oper. Res. Lett., 37(5):303–306, 2009.
- Virginia Vassilevska Williams. On some fine-grained questions in algorithms and complexity. In Proc. ICM, volume 3, pages 3431–3472. World Scientific, 2018.
- R. Ryan Williams. Faster All-Pairs Shortest Paths via circuit complexity. SIAM J. Comput., 47(5):1965–1985, 2018.
- Improved approximation schemes for (un-)bounded subset-sum and partition. CoRR, abs/2212.02883, 2022.