English

$(1-\epsilon)$-Approximation of Knapsack in Nearly Quadratic Time

Data Structures and Algorithms 2025-08-12 v4

Abstract

Knapsack is one of the most fundamental problems in theoretical computer science. In the (1ϵ)(1 - \epsilon)-approximation setting, although there is a fine-grained lower bound of (n+1/ϵ)2o(1)(n + 1 / \epsilon) ^ {2 - o(1)} based on the (min,+)(\min, +)-convolution hypothesis ([K{\"u}nnemann, Paturi and Stefan Schneider, ICALP 2017] and [Cygan, Mucha, Wegrzycki and Wlodarczyk, 2017]), the best algorithm is randomized and runs in O~(n+(1ϵ)11/5/2Ω(log(1/ϵ)))\tilde O\left(n + (\frac{1}{\epsilon})^{11/5}/2^{\Omega(\sqrt{\log(1/\epsilon)})}\right) time [Deng, Jin and Mao, SODA 2023], and it remains an important open problem whether an algorithm with a running time that matches the lower bound (up to a sub-polynomial factor) exists. We answer the question positively by showing a deterministic (1ϵ)(1 - \epsilon)-approximation scheme for knapsack that runs in O~(n+(1/ϵ)2)\tilde O(n + (1 / \epsilon) ^ {2}) time. We first extend a known lemma in a recursive way to reduce the problem to nϵn \epsilon-additive approximation for nn items with profits in [1,2)[1, 2). Then we give a simple efficient geometry-based algorithm for the reduced problem.

Keywords

Cite

@article{arxiv.2308.07004,
  title  = {$(1-\epsilon)$-Approximation of Knapsack in Nearly Quadratic Time},
  author = {Xiao Mao},
  journal= {arXiv preprint arXiv:2308.07004},
  year   = {2025}
}

Comments

Accepted to STOC 2024; Revision note: expanded technical overview;