250 likes | 269 Views
Learn about the proof and theorem of the Fully PTAS for the Knapsack Decision Version algorithm, its complexity, and the classification and implementation details.
E N D
Puzzle Answer
Theorem Proof.
Algorithm • Classify: for i < m, ci< a= cG, for i > m+1, ci > a. • Sort • For
Fully PTAS • A problem has a fully PTAS if for any ε>0, it has (1+ε)-approximation running in time poly(n,1/ε).
Time • outside loop: O(n) • Inside loop: O(nM) where M=max ci • Core: O(n log (MS)) • Total O(n M log (MS)) • Since input size is O(n log (MS)), this is a pseudo-polynomial-time due to M=2 3 log M