NP Hard - Non D Sorting Cooks THRM: Cook's Theorem - Satisfiability Is NP-complete!

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

-Np hard -Non d sorting Cooks thrm

Any given problem X acts as NP-Hard only if A non-deterministic algorithm usually has two Cook's Theorem proves that satisfiability is N P-complete
there exists a problem Y that is NP-Complete. phases and output steps. The first phase is the by reducing all non-deterministic Turing machines to SAT.
Each Turing machine has access to a two-way infinite
Here, problem Y becomes reducible to problem guessing phase, which makes use of arbitrary
tape (read/write) and a finite state control, which serves
X in a polynomial time. The hardness of an NP- characters to run the problem. The second phase as the program.
Hard problem is equivalent to that of the NP- is the verifying phase, which returns true or false A program for a non-deterministic TM is:
Complete Problem. But here, the NP-Hard for the chosen string. 1. Space on the tape for guessing a solution and
Problems don’t need to be in the NP Class. -Non d serching certificate to permit verification.
-Np complete • In a non-deterministic search algorithm, an 2. A finite set of tape symbols
3. A finite set of states O for the machine, including the
Any given problem X acts as NP-Complete when index between 1 to n is generated randomly. If
start state go and final states Lyes, 4no
there exists an NP problem Y- so that the the key element is found on i-th index then the 4. A transition function, which takes the current machine
problem Y gets reducible to the problem X in a algorithm returns success, else returns false. state, and current tape symbol and returns the new
polynomial line. This means that a given problem • Run the algorithm again and observe the state, symbol, and head position.
can only become NP-Complete if it is a part of output. As the index i is generated randomly, we We know a problem is in NP if we have a NDTM program
NP-Hard as well as NP Problems. A Turing might need to run multiple times before we get to solve it in worst-case time p\~, where p is a
success. polynomial and n is the size of the input.
machine of non-deterministic nature can easily
• For the given example, the key to be searched Cook's Theorem - Satisfiability is NP-complete!
solve this type of problem in a given polynomial Proof: We must show that any problem in NP is at least
time. is 44, and the random index generated is 4. The
as hard as SAT. Any problem in NP has a non-
element in an array on index 4 is 55, which does deterministic TM program which solves it in polynomial
not match with the key index and hence time, specifically
algorithm returns fail. We will take this program and create from it an instance
• On the right side of the figure, the generated of satisfiability such that it is satisfiable if and only if the
random index is 2, and the key to be searched is input string was in the language.
11. The element on index 2 in the array is 11,
which matches the key element. And hence, the
algorithm will return success.

If a polynomial time transform exists, then SAT must be


NP-complete, since a polynomial solution to SAT gives a
polynomial time algorithm to anything in NP.
Our transformation will use boolean variables to
maintain the state of the TM:
Since a polynomial time algorithm for SAT would imply a
polynomial time algorithm for everything in NP.SAT is NP-
hard since we cam guess a sloton to SAT, it is in NP and
thus Np-compite therfore now Cook's theorem has been
proved

You might also like