SLIDE 1
The Vertex Cover Problem Theorem 7.44 Pavan Kantharaju Drexel - - PowerPoint PPT Presentation
The Vertex Cover Problem Theorem 7.44 Pavan Kantharaju Drexel - - PowerPoint PPT Presentation
The Vertex Cover Problem Theorem 7.44 Pavan Kantharaju Drexel University - Department of Computer Science March 13, 2015 Reduction Definition (7.28) A function f : is a polynomial time computable function if some polynomial
SLIDE 2
SLIDE 3
NP-Complete
Definition (7.34)
A language B is NP-Complete if it satisfies the following conditions:
- 1. B is in NP
- 2. Every A in NP can be polynomial-time reducible to B
Theorem (7.36)
Given that A is NP-complete and B in NP, if A ≤P B, then B is NP-complete.
SLIDE 4
Vertex Cover Problem
Definition (vertex cover)
Given a graph G of vertices V and edges E, find a subset of nodes G ′ ⊆ G such that nodes in G ′ touch (or cover) all edges E in G. VERTEX-COVER = {G, k| G is an undirected graph that has a k-node vertex cover} To show that VERTEX-COVER is NP-complete, we show that the problem satisfies the constraints in Definition 7.34.
SLIDE 5
Vertex-cover is in NP
Proof
We can use a vertex cover of size k as the certificate to verify our
- solution. The following is a verifier V for VERTEX-COVER
V =”On input G, k, c:
- 1. Test whether c is a subgraph with k nodes in G
- 2. Test whether c covers all edges in G
- 3. If yes, accept. If no, reject.”
SLIDE 6
3 − SAT ≤P VERTEX − COVER
Proof - Generating a graph
First, we define a gadget. A gadget is a structure that simulates variables and clauses of a satisfiability formula. 3-CNF-SAT = {φ|φ is a 3-CNF satisfiable Boolean formula}
Definition (Variable gadget)
For each variable x in φ, produce two nodes x and ¯ x, and connect them with an edge.
Definition (Clause gadget)
For each clause in φ, create three nodes, labeled by the literals of the clause. All nodes are connected to each other. Finally, we connect each node in the clause gadget with its identical labels in the variable gadget. This will complete the graph.
SLIDE 7
3 − SAT ≤P VERTEX − COVER
Proof - Value of k
Let m and l be the number of variables and clauses, respectively. Thus, we have 2m + 3l nodes in G. We let k = m + 2l.
SLIDE 8
Example Reduction
Sipser, Page 313
φ = (x1 ∨ x1 ∨ x2) ∧ ( ¯ x1 ∨ ¯ x2 ∨ ¯ x2) ∧ ( ¯ x1 ∨ x2 ∨ x2) Reduction produces G, k from φ, where k = 8. G is the following:
Figure : 7.45
SLIDE 9
3 − SAT ≤P VERTEX − COVER
Proof - Correctness of reduction
φ is satisfiable if and only if G has a vertex cover of size k. If φ is satisfiable, then G has a vertex cover of size k.
- 1. For each variable gadget, place the variable corresponding to
the true literal in the assignment into the vertex cover.
- 2. For each clause gadget, select one true literal and put the
remaining two nodes into the vertex cover.
- 3. Vertex cover contains k nodes, covering all edges in G.
SLIDE 10
3 − SAT ≤P VERTEX − COVER
Proof - Correctness of reduction
φ is satisfiable if and only if G has a vertex cover of size k. If G has a vertex cover of size k, then φ is satisfiable. The vertex cover must contain:
◮ One node from each variable gadget ◮ Two nodes from each clause gadget
Take the nodes of the variable gadget that are in the vertex cover and assign true to each literal.
SLIDE 11
Thus, VERTEX-COVER is NP-Complete.
SLIDE 12