We study pseudo-polynomial time algorithms for the fundamental \emph{0-1 Knapsack} problem. In terms of $n$ and $w_{\max}$, previous algorithms for 0-1 Knapsack have cubic time complexities: $O(n^2w_{\max})$ (Bellman 1957), $O(nw_{\max}^2)$ (Kellerer and Pferschy 2004), and $O(n + w_{\max}^3)$ (Polak, Rohwedder, and W\k{e}grzycki 2021). On the other hand, fine-grained complexity only rules out $O((n+w_{\max})^{2-\delta})$ running time, and it is an important question in this area whether $\tilde O(n+w_{\max}^2)$ time is achievable. Our main result makes significant progress towards solving this question: - The 0-1 Knapsack problem has a deterministic algorithm in $\tilde O(n + w_{\max}^{2.5})$ time. Our techniques also apply to the easier \emph{Subset Sum} problem: - The Subset Sum problem has a randomized algorithm in $\tilde O(n + w_{\max}^{1.5})$ time. This improves (and simplifies) the previous $\tilde O(n + w_{\max}^{5/3})$-time algorithm by Polak, Rohwedder, and W\k{e}grzycki (2021) (based on Galil and Margalit (1991), and Bringmann and Wellnitz (2021)). Similar to recent works on Knapsack (and integer programs in general), our algorithms also utilize the \emph{proximity} between optimal integral solutions and fractional solutions. Our new ideas are as follows: - Previous works used an $O(w_{\max})$ proximity bound in the $\ell_1$-norm. As our main conceptual contribution, we use an additive-combinatorial theorem by Erd\H{o}s and S\'{a}rk\"{o}zy (1990) to derive an $\ell_0$-proximity bound of $\tilde O(\sqrt{w_{\max}})$. - Then, the main technical component of our Knapsack result is a dynamic programming algorithm that exploits both $\ell_0$- and $\ell_1$-proximity. It is based on a vast extension of the ``witness propagation'' method, originally designed by Deng, Mao, and Zhong (2023) for the easier \emph{unbounded} setting only.
翻译:我们研究经典\emph{0-1背包}问题的伪多项式时间算法。在参数$n$和$w_{\max}$下,已有0-1背包算法的时间复杂度均为三次:$O(n^2w_{\max})$(Bellman 1957)、$O(nw_{\max}^2)$(Kellerer和Pferschy 2004)以及$O(n + w_{\max}^3)$(Polak、Rohwedder和W\k{e}grzycki 2021)。另一方面,精细复杂度仅排除了$O((n+w_{\max})^{2-\delta})$的运行时间,因此在该领域中一个关键问题是能否实现$\tilde O(n+w_{\max}^2)$时间。我们的主要结果在解决该问题上取得了显著进展:
- 0-1背包问题存在一个确定性算法,运行时间为$\tilde O(n + w_{\max}^{2.5})$。
我们的技术同样适用于更简单的\emph{子集和}问题:
- 子集和问题存在一个随机化算法,运行时间为$\tilde O(n + w_{\max}^{1.5})$。
这改进了(并简化了)Polak、Rohwedder和W\k{e}grzycki(2021)先前提出的$\tilde O(n + w_{\max}^{5/3})$时间算法(基于Galil和Margalit(1991)以及Bringmann和Wellnitz(2021)的工作)。与近期关于背包问题(以及一般整数规划问题)的研究类似,我们的算法也利用了最优整数解与分数解之间的\emph{邻近性}。我们的新思路如下:
- 先前的研究在$\ell_1$-范数下使用了$O(w_{\max})$的邻近界。作为我们的主要概念性贡献,我们利用Erd\H{o}s和S\'{a}rk\"{o}zy(1990)的加性组合定理,推导出一个$\tilde O(\sqrt{w_{\max}})$的$\ell_0$-邻近界。
- 随后,我们背包问题结果的主要技术组成部分是一个同时利用$\ell_0$-和$\ell_1$-邻近性的动态规划算法。该算法基于对“见证传播”方法的大幅扩展,该方法最初由Deng、Mao和Zhong(2023)为更简单的\emph{无界}情形设计。