We present a pseudopolynomial-time algorithm for the Knapsack problem that has running time $\widetilde{O}(n + t\sqrt{p_{\max}})$, where $n$ is the number of items, $t$ is the knapsack capacity, and $p_{\max}$ is the maximum item profit. This improves over the $\widetilde{O}(n + t \, p_{\max})$-time algorithm based on the convolution and prediction technique by Bateni et al.~(STOC 2018). Moreover, we give some evidence, based on a strengthening of the Min-Plus Convolution Hypothesis, that our running time might be optimal. Our algorithm uses two new technical tools, which might be of independent interest. First, we generalize the $\widetilde{O}(n^{1.5})$-time algorithm for bounded monotone min-plus convolution by Chi et al.~(STOC 2022) to the \emph{rectangular} case where the range of entries can be different from the sequence length. Second, we give a reduction from general knapsack instances to \emph{balanced} instances, where all items have nearly the same profit-to-weight ratio, up to a constant factor. Using these techniques, we can also obtain algorithms that run in time $\widetilde{O}(n + OPT\sqrt{w_{\max}})$, $\widetilde{O}(n + (nw_{\max}p_{\max})^{1/3}t^{2/3})$, and $\widetilde{O}(n + (nw_{\max}p_{\max})^{1/3} OPT^{2/3})$, where $OPT$ is the optimal total profit and $w_{\max}$ is the maximum item weight.
翻译:我们提出了一种解决背包问题的伪多项式时间算法,其运行时间为 $\widetilde{O}(n + t\sqrt{p_{\max}})$,其中 $n$ 为物品数量,$t$ 为背包容量,$p_{\max}$ 为物品最大价值。该结果改进了 Bateni 等人(STOC 2018)基于卷积与预测技术提出的 $\widetilde{O}(n + t \, p_{\max})$ 时间算法。此外,基于对最小加卷积猜想的强化形式,我们提供了证据表明我们的运行时间可能是最优的。我们的算法使用了两种新的技术工具,这些工具可能具有独立的研究价值。首先,我们将 Chi 等人(STOC 2022)提出的有界单调最小加卷积 $\widetilde{O}(n^{1.5})$ 时间算法推广到\emph{矩形}情形,其中条目的取值范围可以与序列长度不同。其次,我们提出了一种从一般背包实例到\emph{平衡}实例的归约方法,在平衡实例中所有物品的价值重量比在常数因子范围内近似相等。利用这些技术,我们还可以得到运行时间为 $\widetilde{O}(n + OPT\sqrt{w_{\max}})$、$\widetilde{O}(n + (nw_{\max}p_{\max})^{1/3}t^{2/3})$ 和 $\widetilde{O}(n + (nw_{\max}p_{\max})^{1/3} OPT^{2/3})$ 的算法,其中 $OPT$ 表示最优总价值,$w_{\max}$ 表示物品的最大重量。