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: Fall Semester 2008 CS300 Algorithms Solution #10 1. The clique problem is in NP: Given an instance of the problem and a proposed vertices K , we can check in polynomial time whether K has k pairwise adjacent vertices. Let F = V 1 ≤ i ≤ p C i be a formula in CNF. We shall show how to construct from F a graph G such that G will have a clique of size k if and only if F is satisfiable. For any F , we define V and E as given in the hint. If F is satisfiable then there is a set of truth values for x i (1 ≤ i ≤ n ), such that each clause is true with this assignment. Thus, with this assignment there is at least one literal σ in each C i such that σ is true. Let S = { < σ,i >  σ is true in C i } be a set containing exactly one < σ,i > for each i . Then S forms a clique in G of size k . Similarly, if G has a clique K = ( V ,E ) of size k then let S = { < σ,i >  < σ,i > ∈ V } . Clearly,  S  = k . Furthermore, if S = { σ  < σ,i > ∈ S for some i } then S cannot contain both a literal δ and its complement δ as there is no edge connecting < δ,i > and < δ,j > in G . Hence by setting x i = true if x i ∈ S and...
View
Full
Document
This note was uploaded on 02/04/2010 for the course COMPUTER S cs300 taught by Professor Unkown during the Spring '08 term at Korea Advanced Institute of Science and Technology.
 Spring '08
 Unkown
 Algorithms

Click to edit the document details