Approximately Counting Knapsack Solutions in Subquadratic Time
Weiming Feng, Ce Jin
Abstract
We revisit the classic #Knapsack problem, which asks to count the Boolean points (x 1 , x 2 , . . . , x n ) ∈ 0, 1 n in a given half-space n i=1 W i x i ≤ T . This #P-complete problem is known to admit (1±ε)-approximation. Before this work, [Dyer, STOC 2003]'s O(n 2.5 +n 2 ε -2 )-time randomized approximation scheme remains the fastest known in the natural regime of ε ≥ 1/ poly log n.
In this paper, we give a randomized (1 ± ε)-approximation algorithm for #Knapsack in O(n 1.5 ε -2 ) time (in the standard word-RAM model), achieving the first sub-quadratic dependence on n. Such sub-quadratic running time is rare in the approximate counting literature in general, as a large class of algorithms naturally faces a quadratic-time barrier.
Our algorithm follows Dyer's framework, which reduces #Knapsack to the task of sampling (and approximately counting) solutions in a randomly rounded instance with poly(n)-bounded integer weights. We refine Dyer's framework using the following ideas: * This work was done in part while two authors were visiting the Simons Institute for the Theory of Computing.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 531a9c8e-b031-4b34-ab51-ac91c7154e4fBuilds on8
- Optimal mixing of Glauber dynamics: entropy factorization via high-dimensional expansionZongchen Chen, Kuikui Liu, Eric VigodaSTOC 2021 · 61 citations
- A Fine-Grained Perspective on Approximating Subset Sum and PartitionKarl Bringmann, Vasileios NakosSODA 2021 · 14 citations
- Faster min-plus product for monotone instancesShucheng Chi, Ran Duan, Tianle Xie, Tianyi ZhangSTOC 2022 · 12 citations
- Approximating Knapsack and Partition via Dense Subset SumsMingyang Deng, Ce Jin, Xiao MaoSODA 2023 · 10 citations
- A Nearly Quadratic-Time FPTAS for KnapsackLin Chen, Jiayi Lian, Yuchen Mao, Guochuan ZhangSTOC 2024 · 4 citations
Related papers
- (1 - ε)-Approximation of Knapsack in Nearly Quadratic TimeXiao MaoSTOC 2024
- Knapsack with Small Items in Near-Quadratic TimeKarl BringmannSTOC 2024 · 8 citations
- Derandomizing Pseudopolynomial Algorithms for Subset SumTimothy M. ChanSODA 2026
- Improving Schroeppel and Shamir's algorithm for subset sum via orthogonal vectorsJesper Nederlof, Karol WegrzyckiSTOC 2021
- 0-1 Knapsack in Nearly Quadratic TimeCe JinSTOC 2024 · 6 citations
