An O($nlogn$) approximate knapsack algorithm
By: Nick Dawes
A modified dynamic programming algorithm rapidly and accurately solves large 0/1 knapsack problems. It has computational O($nlogn$), space O($nlogn$) and predictable maximum error. Experimentally it's accuracy increases faster than linearly with the solution size $k$. Problems with $k=10^3$ are solved with an average maximum fractional error of $10^{-4}$ and problems with $k=10^5$ with an average maximum fractional error of $10^{-7}$. The algorithm runs in constant time for all problems with a given $n$. On a common desktop computer the algorithm processes $n=10^3$ problems in $10^{-3}$ seconds and $n=10^6$ problems in 2 seconds.
Similar Papers
An improved approximation algorithm for k-Median
Data Structures and Algorithms
Finds best locations for services using less money.
Weakly Approximating Knapsack in Subquadratic Time
Data Structures and Algorithms
Solves a tricky packing puzzle much faster.
Randomized Rounding over Dynamic Programs
Data Structures and Algorithms
Solves hard problems with many rules faster.