Proof of Cook Levin Theorem (Presentation by Xiechuan, Song and Shuo)
-
Upload
amrinder-arora -
Category
Education
-
view
519 -
download
1
Transcript of Proof of Cook Levin Theorem (Presentation by Xiechuan, Song and Shuo)
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