Cooks Theorem: V.Radhesyam
Cooks Theorem: V.Radhesyam
ON
Cooks Theorem
V.Radhesyam
Assistant professor
Department of IT:VRSEC
Types of Problems
• Any problem for which answer is 0 or1 is called
decision problem, such algorithm is called decision
algorithm.
P
Reducibility
• If a problem L1 is polynomial time reducible
to L2 we denote as L1<P L2
• If we can convert one instance of problem
L1 in to problem L2.
3x+4 ax2+bx+c
A B
Graph coloring
Problem
D C
Examples
• NP-Complete Problems
– Following are some NP-Complete problems, for which no polynomial
time algorithm is known.
– Determining whether a graph has a Hamiltonian cycle
– Determining whether a Boolean formula is satisfiable
• NP-Hard Problems
– The following problems are NP-Hard
– The circuit-satisfiability problem
– Set Cover
– Vertex Cover
– Travelling Salesman Problem
NP-Hard and NP- Complete
• A decision problem Pi is NP-Hard if every
problem in NP is polynomial time reducible to Pi .
• A decision problem Pi is NP-Complete(NPC) if it
is both NP-Hard and NP.
Q: What does it mean if we can reduce problem P
in to problem Q
P is no harder than Q
Q: What was the first problem shown to be NP-
complete
Boolean satisfibility problem(SAT) by cook
Relation between P,NP,NP-
complete and NP-hard
NP hard
NP
P
NP complete
Boolean satisfibility problem(SAT)
( x1 x2 x
3 )
( x1 x2 x
3 )
P NP P
NP P
Cooks Theorem
13
Assumptions on non deterministic
machine model
• The machine on which A is executed is word oriented each word
w bit long it take one unit of time perform Add Sub Mul and so on
• All assignments in A are one of the following forms
<simple variable>:=<simple expression>
<array variable>:=<simple variable>
<simple variable>:=<array variable>
<simple variable>:=choice(s) ;S is finet set
• All variables in A are of type integer or boolean
• A contains no read/write statements
• A contains no constants.