Here we give an introduction to approximation algorithms. The main source of this section is the compendium of NP-optimization problems from Viggo Kann [CK97]. If not otherwise mentioned, all given definitions and assertions can be found there.
Approximation algorithms are defined for optimization problems. Since the class of our main interest is NP, we focus on NP-optimization problems.
Definition 7.1.1. An NP-optimization problem A is a 4-tuple (I, sol, cost, goal) such that the following holds.
1. I ∈ P is the set of instances.
2. for an instance x ∈ I, sol(x) denotes the feasible solutions of x. There exists a polynomial pA such that (∀y ∈ sol(x))[|y| ≤ pA(|x|)]. Moreover, for any x, y such that |y| ≤ pA(|x|), it is decidable in polynomial time, whether y ∈ sol(x).
3. For an instance x with a feasible solution y, cost(x, y) ∈ N denotes the costs of y. The function cost is in FP and is also called the objective function.
4. goal ∈ {min, max}.
The class NPO is the class of all NP-optimization problems.
The goal of an NPO-problem is to find an optimum solution for a given instance x, that is, a feasible solution y such that
cost(x, y) = goal{cost(x, y0) : y0 ∈ sol(x)}.
In the following, opt will denote the function mapping an instance x to the cost of an optimum solution.
It is easy to see that if an NPO-problem can be solved in polynomial time, then its corresponding decision problem is also in P. As a consequence, if P 6=
NP, any NPO-problem with an associated NP-complete decision problem is not solvable in polynomial time. Hence, for those problems, it is reasonable to look for approximate solutions computable in polynomial time.
Definition 7.1.2. Let A be an NPO-problem. Given an instance x and a feasible solution y of x, we define the approximation ratio of y with respect to x as
RA(x, y) = max
½cost(x, y)
opt(x) , opt(x) cost(x, y)
¾ .
Hence, the approximation ratio is always a number greater than or equal to 1 and the smaller approximation ratio, the better the solution.
Definition 7.1.3. An NPO-problem A belongs to the class APX if and only if there exists some constant c > 1 and an algorithm T that for each input x ∈ IA returns a feasible solution T (x) such that
RA(x, T (x)) ≤ c.
In this situation we call T a c-approximation for A.
From a practical point of view, it is usually sufficient to have c-approximation problem with a conveniently small c > 1. Some problems allow for even better algorithms, so called approximation schemes.
Chapter 7 Approximation of Alternative Solutions
Definition 7.1.4. Let A be an NPO-problem. An algorithm T is said to be an approximation scheme for A if and only if, for any instance x of A and for any rational ε > 1, T (x, ε) returns a feasible solution of x whose approximation ratio is at most ε.
Optimization problems with approximation schemes are classified with respect to the running time of the approximation scheme.
Definition 7.1.5. An NPO-problem A belongs to the class PTAS if and only if it admits a polynomial-time approximation scheme (ptas), that is, an approximation scheme whose running time is bounded by a polynomial qε(|x|), for each ε > 0.
Observe that the time complexity of an approximation scheme in the above definition may be of the type 21/(ε−1)p(|x|) or |x|1/(ε−1), where p is a polynomial.
Thus, computations with ε values very close to 1 may be practically unfeasible.
This leads us to the following definition.
Definition 7.1.6. An NPO-problem A belongs to the class FPTAS if and only if it admits a fully polynomial-time approximation scheme (fptas), that is, an approximation scheme whose time complexity is bounded by q(|x|, (ε−1)−1), where q is a polynomial.
Clearly, the following inclusions hold:
FPTAS ⊆ PTAS ⊆ APX ⊆ NPO.
These inclusions are strict under the assumption that P 6= NP.
In order to introduce a notion of completeness in NPO and APX, we give the following notion of an approximation preserving reduction.
Definition 7.1.7. Let A and B be two NPO-problems. A is said to be ptas-reducible to B, in symbols A ≤ptas B, if three functions f , g, and c exist such that:
1. For any x ∈ IA and for any rational ε > 1, f (x, ε) ∈ IB is computable in time polynomial with respect to |x|.
2. For any x ∈ IA, for any y ∈ solB(f (x, ε)), and for any rational ε > 1, g(x, y, ε) ∈ solA(x) is computable in time polynomial with respect to both |x|
and |y|.
3. c : {q ∈ Q : q > 1} → {q ∈ Q : q > 1} is computable and invertible.
4. For any x ∈ IA, for any y ∈ solB(f (x, ε)), and for any rational ε > 1, RB(f (x, ε), y) ≤ c(ε) implies RA(x, g(x, y, ε)) ≤ ε.
The following theorem is a corollary of Definition 7.1.7.
Theorem 7.1.8. If A ≤ptas B and B ∈ APX (respectively, B ∈ PTAS), then A ∈ APX (respectively, A ∈ PTAS).
Definition 7.1.9. An NPO-problem A is called NPO-complete if and only if, for each B ∈ NPO, B ≤ptasA.
Definition 7.1.10. An NPO-problem A is called APX-hard if and only if, for each B ∈ APX, B ≤ptas A. An APX-hard problem is APX-complete if it belongs to APX.
By Theorem 7.1.8, it is immediate that if an NPO-problem A is NPO-complete (APX-hard) then A 6∈ APX (A 6∈ PTAS).
We will also make use of the following new type of a fptas-preserving reduction.
In particular, we will use this notion of reduction to show that the problem of approximating the second best Steiner tree admits no fptas.
Definition 7.1.11. Let A and B be two NPO-problems. A is said to be ≤f ptas -reducible to B if three functions f , g, and c exist such that:
1. For any x ∈ IA, f (x) ∈ IB is computable in time polynomial with respect to
|x|.
2. For any x ∈ IA, for any y ∈ solB(f (x)), g(x, y) ∈ solA(x) is computable in time polynomial with respect to both |x| and |y|.
3. c : Σ∗×{q ∈ Q : q > 1} → {c ∈ Q : q > 1} is computable in polynomial-time and |x|,p((ε−1)1 −1) ≤ c(x, ε) − 1, for some polynomial p, for all ε ∈ {q ∈ Q : q > 1}, x ∈ IA.
4. For any x ∈ IA, for any y ∈ solB(f (x), and for any rational ε > 1, RB(f (x), y) ≤ c(x, ε) implies RA(x, g(x, y)) ≤ ε.
This type of reduction preserves fptas’ in the following way.
Theorem 7.1.12. If A ≤f ptas B and B ∈ FPTAS, then A ∈ FPTAS.
Proof. We will give an fptas for A based on the ≤f ptas-reduction, given by functions f, g, c, and the fptas for B. Let x ∈ IA and ε ∈ {q ∈ Q : q > 1}. First we compute f (x). Then, we apply the ptas for A to the instance (f (x), c(x, ε)). Its running-time is polynomial in 1/(c(x, ε)−1) ≤ p(|x|, 1/(ε−1)) and f (x) and thus, polynomial in 1/(ε − 1) and |x|. So we obtain a c(ε, x)-approximation y for f (x) and use g to compute the ε-approximation g(x, y) for x. Since the running-time of the whole process is polynomial in 1/(ε − 1) and |x|, the described algorithm is an fptas for A.
Chapter 7 Approximation of Alternative Solutions