Tutorial questions for November 20th, 21st and 26th
In these problems, we revisit the following problem that already
appeared on a previous tutorial, on a tutorial quiz, and on the
assignment:
Vertex cover: Given a graph G = (V, E) and an integer K, we
want to find a vertex cover with K vertices in G. That is, we want a
subset W of V such that |W| = K, and the property that every edge in E
has at least one endpoint in W.
- Prove that the vertex cover problem belongs to NP.
- In order to prove that the vertex cover problem is NP-complete,
we need to either
- Reduce the vertex cover problem to a known NP-complete
problem (say, 3SAT), or
- Reduce a known NP-complete problem (say, 3SAT) to the vertex
cover problem
Which one is it, and why?
- For the remainder of this tutorial, we will be reducing 3SAT to
vertex cover (whether or not it is the correct answer to question 2).
Given an instance of 3SAT with n variables X1,
X2, ..., Xn, and m clauses
C1, C2, ..., Cm,
we construct a graph as follows:
- We generate 2n nodes which we will call
X1,
X1,
X2,
X2, ...,
Xn,
Xn
and n edges
{ X1,
X1 },
{ X2,
X2 },
{ Xn,
Xn }.
- We generate 3m nodes which we call
Y1,1,
Y1,2,
Y1,3,
Y2,1,
Y2,2,
Y2,3,
...,
Ym,1,
Ym,2,
Ym,3
and 3m edges
{ Y1,1, Y1,2 },
{ Y1,1, Y1,3 },
{ Y1,2, Y1,3 },
{ Y2,1, Y2,2 },
{ Y2,1, Y2,3 },
{ Y2,2, Y2,3 },
...,
{ Ym,1, Ym,2 },
{ Ym,1, Ym,3 },
{ Ym,2, Ym,3 }.
- Finally, for each literal Xi (say) that appears at
position j in clause Ck, we add the edge
{ Ym,j, Xi }.
Draw the graph constructed by the reduction for the following instance
of 3SAT: (X1 v X2 v v X3) ^
(X1 v X2 v X3) ^
(X2 v X3 v X4) ^
(X1 v X3 v X4).
- Choose a value of K with the property that the instance of
3SAT is satisfiable if and only if the graph constructed by the
reduction has a vertex cover with at most K elements.
- Prove that if the instance of 3SAT is satisfiable, then the graph
constructed by the reduction has a vertex cover with at most K
elements.
- Prove that if the graph constructed by the reduction has a vertex
cover with at most K elements, then the instance of 3SAT is
satisfiable.