Skip to content

Faster Deterministic Approximation for Counting Knapsack

Ce Jin, Jaewoo Park, Barna Saha

cs.DSarXiv:2610.14595

Abstract

Given n nonnegative integer weights w1, …, wn and an integer knapsack capacity T, the \#Knapsack problem asks to count the number of subsets I ⊂eq \1, 2, …, n\ such that Σi ∈ I wi T. A long line of research has been devoted to designing faster (1 )-approximation algorithms for this \#P-hard problem. Until very recently, the best-known time complexity was O(n2.5/poly()), achieved by the randomized algorithm of [Dyer, STOC 2003] and the deterministic algorithm of [Gawrychowski, Markin, and Weimann, ICALP 2018]. The recent work by [Feng and Jin, SODA 2025] improved the randomized complexity to O(n1.5/poly()), leaving open the question whether this n2.5 barrier could also be broken by a deterministic algorithm. In this work, we answer this question in the affirmative by presenting a deterministic (1 + )-approximation algorithm for \#Knapsack in O(n2.4/poly()) time. Our key technical innovation is to deterministically simulate the balancing technique, which was previously used in the literature of knapsack-type problems via random partitions and seemed to require randomization.

Create a lesson