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(n^3 w_{\mathrm{max}}^2)$ [Tamir'09], $\tilde O(n^2 w_{\mathrm{max}}^2)$ and $\tilde O(n w_{\mathrm{max}}^3)$ [Bateni, Hajiaghayi, Seddighin, Stein'18], $O(n^2 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.
翻译:背包问题是计算机科学、优化与运筹学交叉领域中一个最基础的NP完全问题。近期一系列研究致力于理解以最大物品重量 $w_{\mathrm{max}}$ 和物品数量 $n$ 为参数的伪多项式时间背包算法的复杂性。条件性下界排除了在 $O((n+w_{\mathrm{max}})^{2-\delta})$ 时间内(对任意 $\delta > 0$)求解背包问题的可能性[Cygan, Mucha, Wegrzycki, Wlodarczyk'17, Künnemann, Paturi, Schneider'17]。这引发了能否在 $\tilde O((n+w_{\mathrm{max}})^2)$ 时间内求解背包问题的探讨。该问题对于0-1背包(每件物品最多选取一次)和有界背包(每件物品具有多重性)均未解决。为解决此问题的一系列研究先后提出了时间复杂度为 $\tilde O(n^3 w_{\mathrm{max}}^2)$ [Tamir'09]、$\tilde O(n^2 w_{\mathrm{max}}^2)$ 和 $\tilde O(n w_{\mathrm{max}}^3)$ [Bateni, Hajiaghayi, Seddighin, Stein'18]、$O(n^2 w_{\mathrm{max}}^2)$ 和 $\tilde O(n w_{\mathrm{max}}^2)$ [Eisenbrand and Weismantel'18]、$O(n + w_{\mathrm{max}}^3)$ [Polak, Rohwedder, Wegrzycki'21] 以及近期 $\tilde O(n + w_{\mathrm{max}}^{12/5})$ [Chen, Lian, Mao, Zhang'23] 的有界背包算法。本文通过设计运行时间为 $\tilde O(n + w_{\mathrm{max}}^2)$ 的有界背包算法解决了该问题,该时间在条件性假设下近乎最优。这一结果同时解决了经典0-1背包问题与有界背包问题的算法复杂度问题。