A Deterministic Polynomial-time Approximation Scheme for Counting Knapsack Solutions
Preprint
Abstract
Given n elements with nonnegative integer weights w1,..., wn and an integer capacity C, we consider the counting version of the classic knapsack problem: find the number of distinct subsets whose weights add up to at most the given capacity. We give a deterministic algorithm that estimates the number of solutions to within relative error 1+-eps in time polynomial in n and 1/eps (fully polynomial approximation scheme). More precisely, our algorithm takes time O(n^3 (1/eps) log (n/eps)). Our algorithm is based on dynamic programming. Previously, randomized polynomial time approximation schemes were known first by Morris and Sinclair via Markov chain Monte Carlo techniques, and subsequently by Dyer via dynamic programming and rejection sampling.Keywords
All Related Versions
This publication has 11 references indexed in Scilit:
- Counting without sampling: Asymptotics of the log‐partition function for certain statistical physics modelsRandom Structures & Algorithms, 2008
- Simulated annealing in convex bodies and an volume algorithmJournal of Computer and System Sciences, 2006
- A polynomial-time approximation algorithm for the permanent of a matrix with nonnegative entriesJournal of the ACM, 2004
- Random Walks on Truncated Cubes and Sampling 0-1 Knapsack SolutionsSIAM Journal on Computing, 2004
- Markov Chain Algorithms for Planar Lattice StructuresSIAM Journal on Computing, 2001
- A very simple algorithm for estimating the number of k‐colorings of a low‐degree graphRandom Structures & Algorithms, 1995
- Polynomial-Time Approximation Algorithms for the Ising ModelSIAM Journal on Computing, 1993
- A Mildly Exponential Time Algorithm for Approximating the Number of Solutions to a Multidimensional Knapsack ProblemCombinatorics, Probability and Computing, 1993
- A random polynomial-time algorithm for approximating the volume of convex bodiesJournal of the ACM, 1991
- Approximating the PermanentSIAM Journal on Computing, 1989