0% found this document useful (0 votes)
2K views14 pages

Understanding Cook's Theorem in DAA

The document discusses Cook's theorem, which states that the Boolean satisfiability problem (SAT) is NP-complete. It can be proved in two parts. First, assuming P=NP, it shows that SAT is in P. Second, it shows that if SAT is in P, then P=NP. The theorem establishes SAT as the first problem shown to be NP-complete. It relies on assumptions about a nondeterministic machine model.

Uploaded by

Manohar Datt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views14 pages

Understanding Cook's Theorem in DAA

The document discusses Cook's theorem, which states that the Boolean satisfiability problem (SAT) is NP-complete. It can be proved in two parts. First, assuming P=NP, it shows that SAT is in P. Second, it shows that if SAT is in P, then P=NP. The theorem establishes SAT as the first problem shown to be NP-complete. It relies on assumptions about a nondeterministic machine model.

Uploaded by

Manohar Datt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
  • Lecture on Cook's Theorem: Introduces the topic of Cook's Theorem, an important concept in theoretical computer science.
  • Types of Problems: Discusses various types of computational problems, including decision and optimization problems.
  • Non-deterministic Algorithm: Explains non-deterministic algorithms and their comparison to deterministic ones.
  • P and NP: Defines the complexity classes P and NP, explaining their significance in computing.
  • Reducibility: Explores the concept of reducibility between problems and its implications for complexity theory.
  • NP-completeness concept: Illustrates NP-completeness concept with humor, stressing its importance in theoretical studies.
  • Examples of NP-Complete and NP-Hard Problems: Lists examples of NP-Complete and NP-Hard problems, highlighting their challenges.
  • NP-Hard and NP-Complete: Explains the relationship between NP-Hard and NP-Complete problems and their significance.
  • Relation between P, NP, NP-complete, and NP-hard: Visualizes the relationship between different complexity classes and their overlap.
  • Boolean Satisfiability Problem (SAT): Describes the SAT problem, a critical concept in logic and computing.
  • Cook's Theorem - Part I: Introduces Cook's Theorem with a focus on proving the NP-completeness of SAT.
  • Cook's Theorem - Part II: Continues the proof of Cook's Theorem, focusing on theoretical implications.
  • Sufficient Condition for Cook's Theorem: Explores conditions necessary for the successful application of Cook's Theorem.
  • Assumptions on Non-deterministic Machine Model: Describes theoretical assumptions about non-deterministic machines necessary for the theorem.

Lecture

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.

• Any problem that involves identification of optimal value


of given cost function is known as optimization
problem, such algorithm is optimization algorithm.

• An algorithm for a given problem is said to be


polynomial time algorithm if its time complexity belongs
O(nk), Where k is an integer.

• An algorithm for a given problem is said to be non


polynomial time algorithm if it is Not a polynomial time
algorithm. Fibonacci series(O(2^n), TSP(n^2 2^n)
Non deterministic Algorithm
• Deterministic machine: It A is array of size n
is a machine that at any j:=choice(1,n)
given state during If A[j]=key then
execution, reading Input
symbol next state is {
known . Algorithms run on Write(j);
deterministic machines Success();
are called Deterministic
algorithms. }
else
• If not such machines are {
called non deterministic Write(0);
machines and such
algorithms are called non Failure()
deterministic algorithms. }
P and NP
• P: The class of decision problems that are
solvable in polynomial time by deterministic
algorithms.

• NP: The class of decision problems that are


solvable in polynomial time by non
deterministic algorithms. NP

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)

• Clause: Disjunction of literals ( x 1  x2  x



3 ) ( x1  x2  x
3 )

• CNF Conjunctive normal form



( x1  x2  x
3 ) 
( x1  x2  x
3 )

• It is conjunction of one or more clauses


• SAT : Find the assignment to the variables to
0/1 such that formula is true.
Cooks Theorem
• Cook's theorem, states that the 
Boolean satisfiability problem is 
NP-complete
• It can be proved in two parts
PART-I
• Assume P=NP
• We need to prove Satisfibility is in P
• We know that Satisfibility is in NP by definition
• Therefore Satisfibility is in P
Cooks Theorem
PART-II
• Assume Satisfibility is in P
• We need to prove P=NP
NP
• This can be further proved as

P  NP P

NP  P
Cooks Theorem

• The sufficient condition is


• How to obtain nondeterministic
algorithm A and Input I a formula Q (A, I)
Such that Q is Satisfiable iff A has a
succeful termination with input
• This condition can be proved by the
Assumptions.

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.

You might also like