Around 1971, Cook and Levin independently discovered the notion of NP−completeness and gave examples of combinatorial NP−complete problems whose definition seems to have nothing to do with Turing machines. Soon after, Karp showed that NP−completeness occurs widely and many problems of practical interest are NP−complete. To date, thousands of computational problems in a variety of disciplines have been shown to be NP−complete.
SAT is the language of all satisfiable CNF formulae.
Cook-Levin Theorem: SAT is NP−complete
Before we go into the proof first we need to define some things
Configuration of a Turing Machine: A configuration of a Turing Machine at any point of time t is basically the snapshot of the turning machine at that time. It is an ordered pair of the head position, current state, and tape content. Any configuration is initialized and ended with a special symbol, let # mark its ending. Then the contents of the tape at the left of the head, then the current state then the content of the cell where the head is pointed and the content of the tape at the right of the head. So if any configuration is like (#,w1,w2,q,w3,w4,w5,w6,#) then the head is pointed at 3rd letter in state q and the content of the tape is w1w2w3w4w5w6
Computation Tableau of a Turing Machine: It is a table of configurations where form i−the row to i+1−the row it follows the turning machine's transition function at time i on any input x and the first row is the starting configuration. A tableau is accepting if any in the tableau is an accepting configuration.
Now let's come to the proof of the theorem.
Proof: Let L be any language in NP. Then there exists a nondeterministic turning machine M with runtime nk and L=L(M).
Idea: The idea is to encode the computation tableau of M on input x, |x|=n to a boolean formula φ such that there is an accepting configuration iff φ∈SAT
Let x=w1w2…wn. Let C=Q∪Γ∪{#} where Q is the set of states of M and Γ is set of alphabets of M. Since the Turing machine runs for time nk it can at most access nk space, So the computation tableau will have nk rows and nk columns. Now the initial configuration is (#,q0,w1,w2,…,wn,⊔,…,⊔,#)Now any cell in the tableau contains a symbol from C. So for each (i,j)−the cell and s∈C introduce a variable xi,j,s. xi,j,s=1 iff the (i,j)−the cell in the tableau has the symbol s, otherwise xi,j,s=0.
Therefore we can encode the starting configuration as φstart=x1,1,#∧(n+1⋀j=2x1,j,wj−1)∧(nk−1⋀j=n+2x1,j,⊔)∧x1,nk,#Now setting xi,j,s=1 corresponds to placing s in (i,j)−the cell. To obtain a correspondence between an assignment and a tableau, we must ensure that the assignment sets to 1 exactly one variable for each cell. First, we need to ensure each cell has at least one symbol placed in it. We do it by ⋁s∈Cxi,j,s. Now we have to ensure that the cell does not have more than two symbols placed in it. We do it by ⋁s,t∈C,s≠t(¯xi,j,s∧¯xi,j,t). Hence for each cell, these two conditions both should follow, therefore (⋁s∈Cxi,j,s)∧(⋁s,t∈C,s≠t(¯xi,j,s∧¯xi,j,t))There condition should follow for every cell, therefore, we get the second part for our desired boolean function φcell=⋀1≤i,j≤nk[(⋁s∈Cxi,j,s)∧(⋁s,t∈C,s≠t(¯xi,j,s∧¯xi,j,t))]
Formula φaccept guarantees that an accepting configuration occurs in the tableau. The formula ensures that φaccept, the symbol for the accept state, occurs in one of the cells of the tableau by stipulating that one of the corresponding variables is set to 1. Hence the formula for it is φaccept=⋀1≤i,j≤nkxi,j,qaccept
Comments
Post a Comment