

























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
An in-depth explanation of the cook-levin theorem, which states that every problem in the np class can be reduced to the satisfiability problem (sat). The definition of np-complete problems, polynomial-time reductions, and the cook-levin theorem statement. It also provides a proof of the theorem using a reduction from every np problem to sat.
Typology: Slides
1 / 33
This page cannot be seen from the preview
Don't miss anything!
x ( G , k ) y ( G’ , k’ )
x ∈ L y ∈ L ’ ( G has IS of size k ) ( G’ has clique of size k’ )
P
SAT NP
P
SAT NP
w q0 w 1 w 2
qacc …
S- th configuration symbol at time T
Since M is nondeterministic, there may be many possible tableaus
q0 w 1 w 2
q (^) acc …
n = length of input w
height of tableau is p ( n ) for some polynomial p
width is at most p ( n )
k possible tableau symbols
true, if the ( T , S ) cell of tableau contains u false, if not
u
1 ≤ S ≤ p ( n ) 1 ≤ T ≤ p ( n ) 1 ≤ u ≤ k
true, if the ( T , S ) cell of tableau contains u false, if not
1 ≤ S ≤ p ( n ) 1 ≤ T ≤ p ( n ) 1 ≤ u ≤ k
f ( x 1, 1, 1 , ..., xp ( n ), p ( n ), k ) =
true, if the x s represent a valid accepting tableau false, if not
q0 w 1 w 2
q (^) acc …
u
f cell: (^) “Every cell contains
exactly one symbol”
“The first row is q 0 w 1 w 2 ... w (^) k ☐...☐”
f 0 :
f move : (^) “The moves between rows follow the transitions of M ”
f acc: (^) “qacc appears somewhere in the last row”
f 0 : (^) “The first row is q 0 w 1 w 2 ... w (^) k ☐...☐” f acc: “qacc appears somewhere in the last row”
f 0 = x 1, 1, q0 ∧ x 1, 1, w 1 ∧ x 1, 1, w2 ∧ ... ∧ x 1, p ( n ),☐
f acc = x (^) p ( n ), 1, qacc ∨ x (^) p ( n ), 2, qacc ∨ ... ∨ x (^) p ( n ), p ( n ), qacc
… 6 c3a0t0 … … 0 c6a0p0 … 0
… 6 t 3 t 0 u 0 … … 0 t 6 t 0 u 0 … 0
valid window
invalid window
… 6 t 3 t 0 u 0 … … 0 t 6 t 0 q 3 … 0
valid window
… 6 t 3 q 3 u 0 … … 0 t 6 a 0 q 7 … 0
valid if δ(q 3 , u) = (q 7 , a, R)
… 6 q3t0u0 … … 0 k6t0q0 … 0
invalid window
… 6 c3a0t0 … … 0 b6a0t0 … 0
valid window
CLIQUE = {(G, k ): G is a graph with a clique of k vertices} IS = {(G, k ): G is a graph with an independent set of k vertices} VC = {(G, k ): G is a graph with a vertex cover of k vertices}
SAT
NP
CLIQUE IS (^) VC
roadmap:
SAT
3SAT
IS
CLIQUE VC
Boolean formula f 3CNF formula f ’
f ’ is satisfiable
f is satisfiable
We give extra variables to every gate (“wire”)
x 3
x 6 x 7
x 8 x 9
x 4 x 5
x 10 AND
OR NOT
AND
NOT OR
AND
NOT
x 2 x 1 x 2 x 1 x 1 x 2
x 4 x 5 x 7 x 7 = x 4 ∧ x 5 T T T T T T F F T F T F T F F T F T T F F T F T F F T F F F F T
( x 4 ∨ x 5 ∨ x 7 ) ( x 4 ∨ x 5 ∨ x 7 ) ( x 4 ∨ x 5 ∨ x 7 )
( x 4 ∨ x 5 ∨ x 7 )
( x 4 ∨ x 5 ∨ x 7 ) ∧( x 4 ∨ x 5 ∨ x 7 ) ∧( x 4 ∨ x 5 ∨ x 7 ) ∧( x 4 ∨ x 5 ∨ x 7 )