25 VertexCover
25 VertexCover
1
Many optimization problems are
solvable in P.
Examples
◦ MST
◦ Minimum Cut
Manyare NP-hard
Examples
◦ MINIMUM_VERTEX_COVER
◦ TSP
2
What can we do for NP-Hard
problems?
As of now, there is no known
polynomial exact algorithm for NP-
Hard problems.
Can we find a near-optimal
solutions in polynomial time?
Means what? An algorithm that
runs in polynomial time and
outputs a solution close to the
optimal solution is called an
approximation algorithm.
3
VERTEX COVER
Given an undirected graph
G(V,E). Find the minimum vertex
cover.
4
APPROX-VERTEX_COVER(G)
◦ While
Do let be an arbitrary edge of
5
VERTEX COVER
Given an undirected graph
G(V,E). Find the minimum vertex
cover.
6
VERTEX COVER
Given an undirected graph
G(V,E). Find the minimum vertex
cover.
7
VERTEX COVER
Given an undirected graph
G(V,E). Find the minimum vertex
cover.
8
Theorem: APPROX-VERTEX-COVER gives a
solution whose cost is at the most twice the
optimal.
Proof:
Let A be the set of edges returned by APPROX-
VERTEX-COVER.
Note every edge in A is disjoint from every
other edge in it.
Thus solution cost .
Optimal solution must have at least one vertex
from each edge of A. Thus Optimal cost = ≥ |A|
= ½*.
Thus Solution Cost ≤ 2* Optimal Cost.