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)先前基于Galil和Margalit(1991)以及Bringmann和Wellnitz(2021)的$\tilde O(n + w_{\max}^{5/3})$时间算法。
与近期关于背包问题(以及一般整数规划)的研究类似,我们的算法也利用了最优整数解与分数解之间的\emph{邻近性}。我们的新思想如下:
- 先前工作使用$\ell_1$范数下的$O(w_{\max})$邻近性界。作为我们的主要概念性贡献,我们利用Erdős和Sárközy(1990)的加性组合定理推导出$\tilde O(\sqrt{w_{\max}})$的$\ell_0$邻近性界。
- 随后,我们背包结果的主要技术组件是一个同时利用$\ell_0$和$\ell_1$邻近性的动态规划算法。该算法基于对“见证传播”方法的大幅扩展,该方法最初由Deng、Mao和Zhong(2023)为更简单的\emph{无界}情形设计。