This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Solutions 1 Some solutions are only sketches: you should be able to fill in the details. Note again that if you are asked to prove NPcompleteness the first thing you must do is prove membership of NP . As this is normally very easy, I have not, apart from the first question, included these parts of the solutions here. Question 1 Prove that Independent Set is NPcomplete. If G has an independent set of size K , then a certificate for this is a set W of K vertices that form an independent set. It is clear that whether W is an independent set can be verified in polynomial time (just check each pair of vertices in W to make sure they are not neighbours) so Independent Set belongs to NP . Now to we need to find a reduction to prove completeness. Note that for a graph G = ( V,E ), the following are equivalent: • W ⊆ V is an independent set in G , • W is a clique in the complement of G , • V W is a vertex cover in G . (If you are not sure why these are equivalent, refer to your notes from last year.) Let’s see how to use the equivalence of the first and third statements to show that Vertex Cover can be reduced to Independent Set . Let n be the number of vertices in G . Then write the decision problem Vertex Cover as follows: Vertex Cover Instance: an undirected graph G = ( V,E ) and a positive integer n K . Question: does G contain a vertex cover containing n K vertices? It is clear that this problem reduces to Independent Set (as defined in the exercises) since G has a vertex cover containing n K vertices if and only if G has an independent set containing K vertices (because W is a vertex cover containing n K vertices if and only if V W is an independent set containing K vertices). You should also try to construct the reduction from Clique to Independent Set . Question 2 Prove that Feedback Vertex Set is NPcomplete. As the hint suggests the proof of completeness is from Vertex Cover ....
View
Full
Document
This note was uploaded on 01/29/2012 for the course ECE 345 taught by Professor Veneris during the Fall '10 term at University of Toronto Toronto.
 Fall '10
 Veneris
 Algorithms, Data Structures

Click to edit the document details