Table of Contents
Fetching ...

Simple and Faster Algorithms for Knapsack

Qizheng He, Zhean Xu

TL;DR

This work addresses faster pseudo-polynomial algorithms for knapsack by focusing on parameterizations in $n$, $w_ ext{max}$, and $p_ ext{max}$. It introduces two randomized strategies: a simple 0-1 knapsack solver with runtime $ ilde{O}(n^{3/2} w_ ext{max})$ and a bounded knapsack solver with runtime $ ilde{O}(n + w_ ext{max}^{5/2})$, each leveraging distinct techniques. The 0-1 algorithm uses a random permutation to concentrate the DP around the expected prefix-optimum weight and a narrow interval DP, while the bounded-knapsack algorithm combines this with a structural reduction based on an Erdős–Graham extension to bound the number of relevant items to $ ilde{O}(w_ ext{max})$. These results improve upon prior bounds such as $ ilde{O}(n w_ ext{max} p_ ext{max}^{2/3})$ and connect additive-combinatorics and number-theoretic methods to knapsack, achieving practical improvements in small-$n$ and small-item regimes and offering new directions for near-optimal conditional lower-bound contexts.

Abstract

In this paper, we obtain a number of new simple pseudo-polynomial time algorithms on the well-known knapsack problem, focusing on the running time dependency on the number of items $n$, the maximum item weight $w_\mathrm{max}$, and the maximum item profit $p_\mathrm{max}$. Our results include: - An $\widetilde{O}(n^{3/2}\cdot \min\{w_\mathrm{max},p_\mathrm{max}\})$-time randomized algorithm for 0-1 knapsack, improving the previous $\widetilde{O}(\min\{n w_\mathrm{max} p_\mathrm{max}^{2/3},n p_\mathrm{max} w_\mathrm{max}^{2/3}\})$ [Bringmann and Cassis, ESA'23] for the small $n$ case. - An $\widetilde{O}(n+\min\{w_\mathrm{max},p_\mathrm{max}\}^{5/2})$-time randomized algorithm for bounded knapsack, improving the previous $O(n+\min\{w_\mathrm{max}^3,p_\mathrm{max}^3\})$ [Polak, Rohwedder and Wegrzyck, ICALP'21].

Simple and Faster Algorithms for Knapsack

TL;DR

This work addresses faster pseudo-polynomial algorithms for knapsack by focusing on parameterizations in , , and . It introduces two randomized strategies: a simple 0-1 knapsack solver with runtime and a bounded knapsack solver with runtime , each leveraging distinct techniques. The 0-1 algorithm uses a random permutation to concentrate the DP around the expected prefix-optimum weight and a narrow interval DP, while the bounded-knapsack algorithm combines this with a structural reduction based on an Erdős–Graham extension to bound the number of relevant items to . These results improve upon prior bounds such as and connect additive-combinatorics and number-theoretic methods to knapsack, achieving practical improvements in small- and small-item regimes and offering new directions for near-optimal conditional lower-bound contexts.

Abstract

In this paper, we obtain a number of new simple pseudo-polynomial time algorithms on the well-known knapsack problem, focusing on the running time dependency on the number of items , the maximum item weight , and the maximum item profit . Our results include: - An -time randomized algorithm for 0-1 knapsack, improving the previous [Bringmann and Cassis, ESA'23] for the small case. - An -time randomized algorithm for bounded knapsack, improving the previous [Polak, Rohwedder and Wegrzyck, ICALP'21].
Paper Structure (9 sections, 8 theorems, 1 equation, 1 table, 1 algorithm)

This paper contains 9 sections, 8 theorems, 1 equation, 1 table, 1 algorithm.

Key Result

Lemma 1

There exists an optimal solution $\mathcal{I}^*$ s.t. $|\Delta(\widetilde{\mathcal{I}},\mathcal{I}^*)|=O(w_\mathrm{max})$.

Theorems & Definitions (9)

  • Lemma 1
  • Lemma 3: Hoeffding's inequality
  • Theorem 4
  • Theorem 5
  • Theorem 6
  • Lemma 7
  • proof : Proof for Theorem \ref{['thm:item_reduction']}
  • Theorem 8
  • Theorem 9