Professional Documents
Culture Documents
Approximation Algorithms
Some examples:
APPROX-VERTEX-COVER(G)
1 C←Ø
2 E′ ← E[G]
3 while E′ ≠ Ø
4 do let (u, v) be an arbitrary edge of E′
5 C ← C U {u, v}
6 remove every edge in E′ incident on u or v
7 return C
• This is a polynomial-time
2-aproximation algorithm. (Why?)
– Because:
• APPROX-VERTEX-COVER is O(V+E)
• |C*| ≥ |A|
Selected Edges
Optimal |C| = 2|A|
|C| ≤ 2|C*|
Selected Vertices
Minimal
Covering set
size=3
3rd chose
2nd chose
Greedy
Covering set
size=4
4th chose
– ρ(n)=H(max{|S| : S Є F})
Proof: 1 d
dth harmonic number H d H (d )
i 1 i
cx cost of element x X paid only when x is covered for the first time
Proof: (continued)
1 unit is charged at
Let C * be an optimal cover C c
x X
x each stage of
algorithm
C be cover from GREEDY - SET - COVER
Cost assigned to
optimal cover:
cx
S C * xS
in >= 1 cx x
Each x is
S in C* SC * xS X
cx
C cx
SC * xS
Set Cover (proof continued)
Theorem: GREEDY-SET-COVER is a
polynomial-time r(n)-approximation algorithm
for
r (n) H (max{| S |: S F })
Proof: (continued)
d
1
How does this relate to dth harmonic number H d H (d )
harmonic numbers?? i 1 i
H ( S ) C * H (max{ S : S F })
And then
conclude that: C
which will finish the proof SC *
Set Cover (proof continued)
Proof of: c
xS
x H( S )
k
H (ui 1 ) H (ui ) H (u0 ) H (u k ) H (u0 ) H (0) H (u0 ) H ( S )
i 1
telescoping sum