Escolar Documentos
Profissional Documentos
Cultura Documentos
Polynomial-Time Approximation
Approximation Ratios Schemes
Optimization Problems
We have some problem instance x that has many A problem L has a polynomial-time
feasible “solutions”. approximation scheme (PTAS) if it has a
We are trying to minimize (or maximize) some cost polynomial-time (1+ε)-approximation algorithm,
function c(S) for a “solution” S to x. For example,
for any fixed ε >0 (this value can appear in the
Finding a minimum spanning tree of a graph
Finding a smallest vertex cover of a graph running time).
Finding a smallest traveling salesperson tour in a graph 0/1 Knapsack has a PTAS, with a running time
An approximation produces a solution T that is O(n3/ ε). Please see §13.4.1 in Goodrich-
T is a k-approximation to the optimal solution OPT Tamassia for details.
if c(T)/c(OPT) < k (assuming a min. prob.; a
maximization approximation would be the reverse)
Approximation Algorithms 3 Approximation Algorithms 4
A 2-Approximation for
Vertex Cover Vertex Cover
Every chosen edge e
A vertex cover of graph G=(V,E) is a subset W of V, Algorithm VertexCoverApprox(G)
has both ends in C
Input graph G
such that, for every (a,b) in E, a is in W or b is in W. But e must be covered Output a vertex cover C for G
OPT-VERTEX-COVER: Given an graph G, find a vertex by an optimal cover; C ← empty set
cover of G with smallest size. hence, one end of e H←G
while H has edges
OPT-VERTEX-COVER is NP-hard. must be in OPT e ← H.removeEdge(H.anEdge())
Thus, there is at most v ← H.origin(e)
twice as many vertices w ← H.destination(e)
C.add(v)
in C as in OPT. C.add(w)
That is, C is a 2-approx. for each f incident to v or w
of OPT H.removeEdge(f)
return C
Running time: O(m)
Approximation Algorithms 5 Approximation Algorithms 6
1
Graphs 6/7/2002 11:50 AM