Approximation algorithms
As we’ve seen, some optimisation problems are “hard” (by
hardness of related decision problem), little chance of finding
polytime algorithm that computes
optimal
solution
•
largest
clique
•
smallest
vertex cover
•
largest
independent set
•
. . .
But:
sometimes
suboptimal
solutions are kind of OK
•
pretty large
clique
•
pretty small
vertex cover
•
pretty large
independent set
•
. . .
if
algorithms run in poly time (preferrably small exponents).
Approximation algorithms
compute
nearoptimal
solutions.
Known for thousands of years. For instance, approximations
of value of
π
; some engineers still use
4
these days
:)
Approximation algorithms
1
Consider
optimisation problem
.
Each potential solution has
positive cost
(or
quality
).
We want
nearoptimal
solution.
Depending on problem, optimal solution may be one with
•
maximum possible cost
(maximisation problem), like
maximum clique,
•
or one with
minimum possible cost
(minimisation prob
lem), like minimum vertex cover.
Algorithm has
approximation ratio
of
ρ
(
n
)
, if for any input
of size
n
, the cost
C
of its solution is
within factor
ρ
(
n
)
of
cost of optimal solution
C
∗
, i.e.
max
C
C
∗
,
C
∗
C
≤
ρ
(
n
)
For
maximisation
problems,
0
< C
≤
C
∗
, thus
C
∗
/C
gives
factor by which optimal solution is better than approximate
solution (note:
C
∗
/C
≥
1
and
C/C
∗
≤
1
).
For
minimisation
problems,
0
< C
∗
≤
C
, thus
C/C
∗
gives
factor by which optimal solution is better than approximate
solution (note
C/C
∗
≥
1
and
C
∗
/C
≤
1
).
Approximation algorithms
2
Approximation ratio is
never
less than one:
C
C
∗
<
1
⇒
C
∗
C
>
1
An algorithm with guaranteed approximation ration of
ρ
(
n
)
is called a
ρ
(
n
)
approximation algorithm
.
A
1
approximation algorithm is optimal, and the larger the
ratio, the worse the solution.
•
For many
N P
complete problems,
constantfactor ap
proximations
(i.e. computed clique is always at least
half the size of maximumsize clique),
•
sometimes in best known approx ratio grows with
n
,
•
and sometimes even proven lower bounds on ratio (
for
every approximation alg, the ratio is at least this and that,
unless
P
=
N P
).
Sometimes better ratio when spending more computation
time.
An
approximation scheme
for an optimisation problem is
an approximation algorithm that takes as input an instance
plus
a parameter
>
0
s.t. for any fixed
, the scheme is a
(1 +
)
approximation (
tradeoff
).
Approximation algorithms
3
A scheme is a
polytime approximation scheme
(PAS) if
for any fixed
>
0
, it runs in time polynomial in input size.
Running time can increase
dramatically
with decreasing
,
consider e.g.
T
(
n
) =
n
2
/
.
2
1
1
/
2
1
/
4
1
/
100
n
T
(
n
)
n
n
2
n
4
n
8
n
200
10
1
10
1
10
2
10
4
10
8
10
200
10
2
10
2
10
4
10
8
10
16
10
400
10
3
10
3
10
6
10
12
10
24
10
600
10
4
10
4
10
8
10
16
10
32
10
800
We want: if
decreases
by constant factor, then running
time
increases by at most
some other constant factor, i.e.,
running time is polynomial in
n
and
1
/
.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '10
 li, Yi, Approximation algorithm, Polynomialtime approximation scheme, approximation algorithms, L

Click to edit the document details