A Value-Scaling Approximation Scheme for Knapsack
Round profits to reduce a dynamic program’s numeric range and bound the total value lost to rounding.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
Measure the state by profit
For nonnegative integer profits, a dynamic program can store the minimum weight achieving each profit. The raw profit range can be very large. Drop individually infeasible items, let \(P\) be the largest remaining profit, and handle \(P=0\) separately. For \(n\) remaining items and \(0<\varepsilon<1\), set \(K=\varepsilon P/n\) and replace profit \(p_i\) by \(\lfloor p_i/K\rfloor\). The sum of rounded profits is \(O(n^2/\varepsilon)\), so the profit-indexed dynamic program runs in polynomial time in \(n,1/\varepsilon\) and input bit lengths.
Rounding losses accumulate one item at a time
The true value of any set is at least its rounded value times \(K\) and exceeds that surrogate by less than \(nK\). The chosen feasible set maximizes rounded value. Its true value is at least \(\mathrm{OPT}-nK\ge(1-\varepsilon)\mathrm{OPT}\), since the best single item is feasible. Pseudopolynomial DP explains the unscaled state range. Approximation guarantees describe the role of the requested accuracy.[1][2]