Sub topic 16
Approximation Classes: PTAS, FPTAS, and APX
This chapter assumes you have read the earlier chapters on approximation ratios, approximation schemes, and hardness of approximation through gap reductions. It also assumes you know what "unless P = NP" means as a conditional result. Here we sort the problems from this tutorial into classes based on how well they can be approximated in polynomial time.
The Classes
Each class is defined by the best guarantee a polynomial-time algorithm can achieve.
- NPO contains NP optimization problems: you can check in polynomial time whether a solution is feasible, and you can compute its objective value in polynomial time.
- APX contains NPO problems that have a polynomial-time algorithm with some constant ratio c.
- PTAS contains problems that have a (1 + ε)-approximation for every fixed ε > 0. The running time must be polynomial in n, but it can grow arbitrarily fast in 1/ε, as in n^(1/ε).
- FPTAS contains problems whose (1 + ε)-approximation runs in time polynomial in both n and 1/ε.
Two classes between APX and NPO are also used: log-APX (ratio O(log n)) and poly-APX (ratio polynomial in n).
If P = NP, every one of these classes collapses into the others, because every problem can then be solved exactly. If P ≠ NP, every inclusion is strict, and the problems below show why.
Placing the Tutorial's Problems
| Problem | Best known guarantee | Class | Barrier (unless P = NP) |
|---|---|---|---|
| 0/1 knapsack | 1 − ε, poly(n, 1/ε) | FPTAS | none, but it is NP-hard, so no exact poly-time algorithm |
| Euclidean TSP | 1 + ε (Arora) | PTAS | no FPTAS (strongly NP-hard) |
| Vertex cover | 2 | APX | no PTAS; no ratio below 1.36 |
| MAX-3SAT | 7/8 | APX | no ratio above 7/8 + ε (Håstad) |
| Metric TSP | 1.5 (Christofides) | APX | no PTAS |
| Set cover | H_n ≈ ln n | log-APX | no (1 − ε) ln n ratio |
| General TSP | none | NPO only | no ratio that is computable in polynomial time |
Two Separation Tools
Strong NP-hardness rules out an FPTAS. Suppose a problem has integer objective values bounded by a polynomial in the input size, and it stays NP-hard when its numbers are written in unary. An FPTAS run with ε < 1/OPT would then return the exact optimum in polynomial time. This is why Euclidean TSP and bin packing have no FPTAS. Knapsack escapes this argument because its values can be exponentially large.
APX-hardness rules out a PTAS. A problem is APX-hard if every problem in APX reduces to it by a PTAS-reduction. This kind of reduction carries a (1 + ε)-approximation for the target back to a (1 + δ)-approximation for the source. The PCP theorem shows that MAX-3SAT has a constant gap that is NP-hard to close. As a result, any APX-hard problem has no PTAS unless P = NP. A problem that is both APX-hard and in APX is called APX-complete. Vertex cover, MAX-3SAT, and metric TSP are all APX-complete.
Exercises
Exercise
A problem is strongly NP-hard and its optimum is always an integer of size at most n. Can it have an FPTAS if P ≠ NP?
Show answer
No. Running the FPTAS with ε = 1/(n+1) takes time polynomial in n and gives error less than 1, so it returns the exact integer optimum in polynomial time. That would solve a strongly NP-hard problem in polynomial time, which implies P = NP.
Exercise
Why is set cover not in APX, while vertex cover is?
Show answer
Vertex cover has a constant-factor (2) algorithm. For set cover, approximating within (1 − ε) ln n is NP-hard, so no constant ratio is possible unless P = NP. The H_n greedy algorithm places set cover in log-APX.
Exercise
A new problem has a 3-approximation, and you find a PTAS-reduction from MAX-3SAT to it. What can you conclude?
Show answer
The problem is in APX because of the 3-approximation. It is APX-hard because MAX-3SAT is APX-complete. So it is APX-complete and has no PTAS unless P = NP.