English

Even Faster Knapsack via Rectangular Monotone Min-Plus Convolution and Balancing

Data Structures and Algorithms 2024-07-02 v2

Abstract

We present a pseudopolynomial-time algorithm for the Knapsack problem that has running time O~(n+tpmax)\widetilde{O}(n + t\sqrt{p_{\max}}), where nn is the number of items, tt is the knapsack capacity, and pmaxp_{\max} is the maximum item profit. This improves over the O~(n+tpmax)\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 O~(n1.5)\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 O~(n+OPTwmax)\widetilde{O}(n + OPT\sqrt{w_{\max}}), O~(n+(nwmaxpmax)1/3t2/3)\widetilde{O}(n + (nw_{\max}p_{\max})^{1/3}t^{2/3}), and O~(n+(nwmaxpmax)1/3OPT2/3)\widetilde{O}(n + (nw_{\max}p_{\max})^{1/3} OPT^{2/3}), where OPTOPT is the optimal total profit and wmaxw_{\max} is the maximum item weight.

Keywords

Cite

@article{arxiv.2404.05681,
  title  = {Even Faster Knapsack via Rectangular Monotone Min-Plus Convolution and Balancing},
  author = {Karl Bringmann and Anita Dürr and Adam Polak},
  journal= {arXiv preprint arXiv:2404.05681},
  year   = {2024}
}
R2 v1 2026-06-28T15:47:47.972Z