CSCE 411 Lecture 33

From Notes
Jump to navigation Jump to search
Lecture Slides

« previous | Wednesday, November 14, 2012 | next »


Vertex Cover

given undirected graph G=(V,E), V′⊆V is a vertex cover iff every edge in E has at least one endpoint in V′

Easy to find big vertex cover: let V′ be all nodes. What about smaller vertex cover?

Decision Problem: Given a graph G and an integer k, does G have a vertex cover of size at most k?

VC ∈ NPC

VC ∈ NP: given a candidate solution V′, we can check in polynomial time if |V′|≤k and every edge has at least one endpoint in V′

Reduction to 3SAT

Let C=c1∧…∧cm be any 3SAT input over the set of variables U={u1,…,un}.

Construct G like this:

  • Two nodes for each variable: ui and ¬ui with an edge between them ("literal" nodes)
  • Three nodes fro each clause cj, "placeholders for the three literals in the clause: aj1 aj2, aj3 with edges making a triangle
  • edges connecting each placeholder node in a triangle to the corresponding literal node
  • Set k=n+2m
Example

3SAT vars u1, ..., u4 and clauses (u1∨¬u3∨¬u4)∧(¬u1∨u2∨¬u4)

k=4+2⋅2=8

Suppose the 3SAT input (with m clauses over n vars) has a satisfying truth assignment (e.g. (u1,u2,u3,u4)=(𝐓,𝐅,𝐓,𝐅)). Show that there is a VC of G of size n+2m:

  • pick node in each pair corresponding to the true literal w.r.t. the satisfying truth assignment
  • pick 2 nodes in each triangle such that the excluded node is connected to a true literal