Presentation is loading. Please wait.

Presentation is loading. Please wait.

PTAS(Polynomial Time Approximation Scheme) cont. Prepared by, Umair S. March 25 th, 2009.

Similar presentations


Presentation on theme: "PTAS(Polynomial Time Approximation Scheme) cont. Prepared by, Umair S. March 25 th, 2009."— Presentation transcript:

1 PTAS(Polynomial Time Approximation Scheme) cont. Prepared by, Umair S. March 25 th, 2009

2 PTAS vs FPTAS  PTAS requires the complexity of an algorithm to be polynomial in terms of input size n for a fixed approximation factor є  FPTAS requires the complexity of an algorithm to be polynomial, both in terms of n as well as 1/ є

3 Designing Polynomial Time Approximation Scheme for Sub-set Sum Problem  Input  Output

4 Designing Polynomial Time Approximation Scheme for Sub-set Sum Problem  In case of approximation, we are interested in a S’ such that  We define, L i be the set of numbers that are sum of all elements in each possible subsets of set S i where, S i is a set of first i th elements in set S. Then,

5 Designing Polynomial Time Approximation Scheme for Sub-set Sum Problem  Pseudo-code for finding the closest sub-sum can be  While i<n  Remove where, l j is any element in set L i  end while  Solution: last element of Ln  Complexity: O(nW)

6 Designing Polynomial Time Approximation Scheme for Sub-set Sum Problem  Complexity is O(nW), W can be exponential in the worst-case!  Consider small intervals instead of exact values in Li?  Equally spaced vs expanding intervals?  Possible to maintain an approximation factor? To be cont. in next lecture…


Download ppt "PTAS(Polynomial Time Approximation Scheme) cont. Prepared by, Umair S. March 25 th, 2009."

Similar presentations


Ads by Google