Docsity

Approx-Vertex-Cover Algorithm for Vertex Cover Problem - Prof. Charles U. Martel, Study notes of Computer Science

Toggle sidebar
bg1
Lecture 14 Dr. Chip Martel, Susan Margulies
Thursday, May 15 ECS 122A, Spring 2008
Vertex Cover Notes
First, we define the Vertex Cover problem. Recall that a vertex cover is a subset C⊆Vof the vertices
such that every edge in the graph has at least one endpoint in C(every edge is covered by at least one
vertex).
Consider the following (which we will prove is a 2-approximation algorithm):
********************************************
ALGORITHM: Approx-Vertex-Cover
INPUT: A graph G
OUTPUT: An vertex cover C⊆V(G)
1C←Ø
2E0←E(G)
3while E06= Ø do
4 Let (u, v) be an arbitrary edge in E(G)
5C←C∪(u, v)
6 Remove every edge in E0touching either uor v
7end while
8return C
********************************************
•Theorem: Approx-Vertex-Cover is a polynomial-time 2-approximation algorithm.
•Proof: What are we proving? This is a minimization problem. Therefore C/C∗≥1. We will show
1≤C/C∗≤2. Clearly, Cis a vertex cover, since we walk the entire edge set, and only remove an
edge if an endpoint is already in the cover. Let A⊆E(G) be the subset of edges chosen in line 4. In
order to cover the set of edges in A, any vertex cover- in particular an optimal cover C∗- must include
at least one end point of each edge in A. No two edges in Ashare an endpoint (since all edges that do
are deleted). Thus, no two edges in Aare covered by the same vertex in C∗. Thus:
|C∗| ≥ |A|
Furthermore, every choice of an edge in line 4 is a choice of two vertices that are not already in C.
Therefore,
|C|= 2|A|
Therefore, clearly
|C∗|≥|A|
2|C∗| ≥ 2|A|=|C|
2≥|C|
|C∗|
1

Partial preview of the text

Download Approx-Vertex-Cover Algorithm for Vertex Cover Problem - Prof. Charles U. Martel and more Study notes Computer Science in PDF only on Docsity!

Lecture 14 Dr. Chip Martel, Susan Margulies Thursday, May 15 ECS 122A, Spring 2008

Vertex Cover Notes

First, we define the Vertex Cover problem. Recall that a vertex cover is a subset C ⊆ V of the vertices such that every edge in the graph has at least one endpoint in C (every edge is covered by at least one vertex). Consider the following (which we will prove is a 2-approximation algorithm):


ALGORITHM: Approx-Vertex-Cover INPUT: A graph G OUTPUT: An vertex cover C ⊆ V (G) 1 C ← Ø 2 E′^ ← E(G) 3 while E′^6 = Ø do 4 Let (u, v) be an arbitrary edge in E(G) 5 C ← C ∪ (u, v) 6 Remove every edge in E′^ touching either u or v 7 end while 8 return C


  • Theorem: Approx-Vertex-Cover is a polynomial-time 2-approximation algorithm.
  • Proof: What are we proving? This is a minimization problem. Therefore C/C∗^ ≥ 1. We will show 1 ≤ C/C∗^ ≤ 2. Clearly, C is a vertex cover, since we walk the entire edge set, and only remove an edge if an endpoint is already in the cover. Let A ⊆ E(G) be the subset of edges chosen in line 4. In order to cover the set of edges in A, any vertex cover- in particular an optimal cover C∗- must include at least one end point of each edge in A. No two edges in A share an endpoint (since all edges that do are deleted). Thus, no two edges in A are covered by the same vertex in C∗. Thus:

|C∗| ≥ |A|

Furthermore, every choice of an edge in line 4 is a choice of two vertices that are not already in C. Therefore,

|C| = 2|A|

Therefore, clearly

|C∗| ≥ |A| 2 |C∗| ≥ 2 |A| = |C|

2 ≥

|C|

|C∗|