Transcript

Proof of Cook-

Levin TheoremTeam: 921S

Member: Xiechuan Liu

Song Song

Shuo Su

1CS 6212/Arora/Fall 2015Xiechuan/Song/Shuo

The Content of Theorem

β€’ Simply: SAT is NP-complete problem

β€’ Actually, there is an explicit CNF formula f

of length O(𝑓(𝑛)3) which is satisfiable if

and only if N accepts w. In particular, when

f(n) is a polynomial, f has polynomial

length in terms of n.

CNF f=True

(length= O(𝑓(𝑛)3) )NTM N accepts

language w

iff

2CS 6212/Arora/Fall 2015Xiechuan/Song/Shuo

The importance of Cook-Levin

Theoremβ€’ Find the first NPC problem: SAT.

β€’ The theorem shows that every problem in

NP-complete can be reduced to a SAT.

β€’ A breakthrough that if SAT = P, Then NP =

P.

3CS 6212/Arora/Fall 2015Xiechuan/Song/Shuo

The proof process

β€’ 1. SAT is NP

Easily proved because any assignment can be verified

whether is satisfiable in polynomial time.

4CS 6212/Arora/Fall 2015Xiechuan/Song/Shuo

The proof process

β€’ 2. SAT is NP-complete

Proof idea: construct a NTM N that accepts w, and reduce

this accepting process into a CNF formula.

CNF f=True

(length= O(𝑓(𝑛)3) )NTM N accepts

language w

iff

5CS 6212/Arora/Fall 2015Xiechuan/Song/Shuo

Definition of NTM N

NTM N (Q, , , , π‘ž0,π‘žπ‘Žπ‘π‘π‘’π‘π‘‘,π‘žπ‘Ÿπ‘’π‘—π‘’π‘π‘‘)

1. Q is the set of states.

2. is the input alphabet not containing the special blank symbol Λ½ ,

3. is the tape alphabet, where ˽∈ and βŠ† ,

4. : Q Γ— β†’ Q Γ— Γ— {L,R} is the transition function,

5. π‘ž0 ∈ Q is the start state,

6. π‘žπ‘Žπ‘π‘π‘’π‘π‘‘ ∈ Q is the accept state, and

7. π‘žπ‘Ÿπ‘’π‘—π‘’π‘π‘‘ ∈ Q is the reject state, where π‘žπ‘Ÿπ‘’π‘—π‘’π‘π‘‘ β‰  π‘žπ‘Žπ‘π‘π‘’π‘π‘‘

Essence: Use the Boolean formula as the constraints to assure the

whole accepting process is a legal computation history that NTM

accepts w.

6CS 6212/Arora/Fall 2015Xiechuan/Song/Shuo

1β†’Y,R

A

REJECT

CB

ACCEPT

Any

wrong

symbol

0β†’X,R

Λ½ β†’ Λ½ ,R

0β†’X,R

L=01*0

w=01110

1 2 3 4 5 6 7 8 9 10

# state w1 w2 w3 w4 w5 w6 w7 #

1 # A 0 1 1 1 0 Λ½ Λ½ #

2 # B X 1 1 1 0 Λ½ Λ½ #

3 # B X Y 1 1 0 Λ½ Λ½ #

4 # B X Y Y 1 0 Λ½ Λ½ #

5 # B X Y Y Y 0 Λ½ Λ½ #

6 # C X Y Y Y X Λ½ Λ½ #

7 #ACC

EPTX Y Y Y X Λ½ Λ½ #

Constraints: cell ∧ start ∧ accept ∧ move𝑋𝑖,𝑗,𝑠 (for all 1≀ i, j ≀ π‘π‘˜ and s ∈ Q βˆͺ βˆͺ {#}) = True iff the cell[i][j]

contains β€œs”

For example, 𝑋3,5,β€œ1” = True iff the cell[3][5] contains β€œ1”

7Xiechuan/Song/Shuo CS 6212/Arora/Fall 2015

cell

1. Every cell must contains one symbol

s ∈ Q βˆͺ βˆͺ {#}

𝑋𝑖,𝑗,𝑠

2. Every cell can only contains one symbol.

𝑠≠𝑑

(¬𝑋𝑖,𝑗,𝑠 ∨ ¬𝑋𝑖,𝑗,𝑑)

means (for example):

𝑋1,1,β€œ#” ∨ 𝑋1,2,β€œ0” ∨ 𝑋1,3,β€œ1” βˆ¨β€¦β€¦

means (for example):

(¬𝑋1,1,β€œ#” ∨ ¬𝑋1,1,β€œ0” ∨ ¬𝑋1,1,β€œ1” ) ∧

(¬𝑋1,2,β€œ#” ∨ ¬𝑋1,2,β€œ0” ∨ ¬𝑋1,2,β€œ1” ) ∧

(¬𝑋1,3,β€œ#” ∨ ¬𝑋1,3,β€œ0” ∨ ¬𝑋1,3,β€œ1” ) βˆ§β€¦.

8CS 6212/Arora/Fall 2015Xiechuan/Song/Shuo

start

1. The first row describes the initial configuration.

start = 𝑋1,1,"#" ∧ 𝑋1,2,"𝐴" ∧ 𝑋1,2,"0" βˆ§β€¦

… ∧ 𝑋1,π‘›π‘˜βˆ’2,"Λ½" ∧ 𝑋1,π‘›π‘˜βˆ’1,"Λ½" ∧

𝑋1,π‘›π‘˜βˆ’1,"#"

accept

1. The ACCEPT state is reached in the

configuration history.

accept =

1≀ i, j ≀ π‘π‘˜

𝑋𝑖,𝑗,"π‘žπ΄πΆπΆπΈπ‘ƒπ‘‡"

9Xiechuan/Song/Shuo CS 6212/Arora/Fall 2015

β€’ move

Every configuration can legally follow the

previous configuration according to the details

of the Non-deterministic Turing Machine’s

transition function.

π‘ž7 π‘ž8b β†’ a,R

a q7 b

a a q8

b q7 b

b a q8

c q7 b

c a q8

move = 𝑋𝑖,π‘—βˆ’1,"π‘Ž" ∧ 𝑋𝑖,𝑗,"π‘ž7" ∧ 𝑋𝑖,𝑗+1,"𝑏" ∧

𝑋𝑖+1,π‘—βˆ’1,"π‘Ž" ∧ 𝑋𝑖+1,𝑗,"π‘Ž" ∧ 𝑋𝑖+1,𝑗+1,"π‘ž8"

10CS 6212/Arora/Fall 2015Xiechuan/Song/Shuo

cell =

1≀ i, j ≀ π‘π‘˜

[(

s ∈ Q βˆͺ βˆͺ {#}

𝑋𝑖,𝑗,𝑠) ∧ (

𝑠≠𝑑

(¬𝑋𝑖,𝑗,𝑠 ∨ ¬𝑋𝑖,𝑗,𝑑))]

start = 𝑋1,1,s1 ∧ 𝑋1,2,s2 ∧ 𝑋1,3,𝑠3 βˆ§β€¦

… ∧ 𝑋1,π‘›π‘˜βˆ’2,"Λ½" ∧ 𝑋1,π‘›π‘˜βˆ’1,"Λ½" ∧ 𝑋1,π‘›π‘˜βˆ’1,"#"

accept =

1≀ i, j ≀ π‘π‘˜

𝑋𝑖,𝑗,"π‘žπ΄πΆπΆπΈπ‘ƒπ‘‡"

move =

1≀ i, j ≀ π‘π‘˜

(

π‘Žπ‘™π‘™ π‘‘β„Žπ‘’ π‘™π‘’π‘”π‘Žπ‘™π‘™π‘¦ π‘€π‘–π‘›π‘‘π‘œπ‘€

(𝑋 ∧ 𝑋 ∧ 𝑋 ∧ 𝑋 ∧ 𝑋 ∧ 𝑋))

= cell ∧ start ∧ accept ∧ move

11Xiechuan/Song/Shuo CS 6212/Arora/Fall 2015

Summary

1. We build a CNF formula

= cell ∧ start ∧ accept ∧ move

which only contains 𝑋𝑖,𝑗,𝑠(true or false),

ANDs and ORs.

2. The whole process of NTM accepting w is

described by , if and only if the process is

correct, = True

12CS 6212/Arora/Fall 2015Xiechuan/Song/Shuo

The last step-Time Analysis

β€’ The time we consume is the running time

of NTM, set i ≀ f(n)

β€’ cell = O(𝑓(𝑛)2)

β€’ start = O(f(n))

β€’ accept = O(1)

β€’ move = O(𝑓(𝑛)2)

So = cell ∧ start ∧ accept ∧ move

and = O(𝑓(𝑛)2)

13CS 6212/Arora/Fall 2015Xiechuan/Song/Shuo

Time Analysis

So clauses = O(𝑓(𝑛)2), there are O(𝑓(𝑛)2) of 𝑋𝑖,𝑗,𝑠( i Γ— j), each encodeable in space

O(log f(n)), the size of is

O(log(f(n)) 𝑓(𝑛)2), which is polynomial.

14CS 6212/Arora/Fall 2015Xiechuan/Song/Shuo


Top Related