0% found this document useful (0 votes)
8 views3 pages

Design and Analysis of Algorithms - Part3

Cook's Theorem establishes the relationship between satisfiability and the P vs NP problem, stating that satisfiability is in P if and only if P equals NP. It outlines a method to construct a deterministic algorithm that determines the outcome of any nondeterministic decision algorithm, demonstrating that if satisfiability is in P, then all algorithms in NP can also be solved in polynomial time. This leads to the conclusion that if satisfiability is in P, then P must equal NP.

Uploaded by

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

Design and Analysis of Algorithms - Part3

Cook's Theorem establishes the relationship between satisfiability and the P vs NP problem, stating that satisfiability is in P if and only if P equals NP. It outlines a method to construct a deterministic algorithm that determines the outcome of any nondeterministic decision algorithm, demonstrating that if satisfiability is in P, then all algorithms in NP can also be solved in polynomial time. This leads to the conclusion that if satisfiability is in P, then P must equal NP.

Uploaded by

swlabcse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

DESIGN AND ANALYSIS OF ALGORITHMS Page 100

DESIGN AND ANALYSIS OF ALGORITHMS Page 101


Cook’s Theorem: States that satisfiability is in P if and only if P=NP If
P=NP then satisfiability is in P
If satisfiability is in P, then P=NP
To do this
> A-) Any polynomial time nondeterministic decision algorithm.
I-)Input of that algorithm
Then formula Q(A, I), Such that Q is satisfiable iff ‘A’ has a successful
termination with Input I.

> If the length of ‘I’ is ‘n’ and the time complexity of A is p(n) for some polynomial
p() then length of Q is O(p3(n) log n)=O(p4(n))
The time needed to construct Q is also O(p3(n) log n).

> A deterministic algorithm ‘Z’ to determine the outcome of ‘A’ on any input ‘I’
Algorithm Z computes ‘Q’ and then uses a deterministic algorithm for the
satisfiability problem to determine whether ‘Q’ is satisfiable.

> If O(q(m)) is the time needed to determine whether a formula of length ‘m’ is
satisfiable then the complexity of ‘Z’ is O(p (n) log n + q(p (n)log n)).
3 3

> If satisfiability is ‘p’, then ‘q(m)’ is a polynomial function of ‘m’ and the
complexity of ‘Z’ becomes ‘O(r(n))’ for some polynomial ‘r()’.

> Hence, if satisfiability is in p, then for every nondeterministic algorithm A in NP, we


can obtain a deterministic Z in p.
By this we shows that satisfiability is in p then P=NP

DESIGN AND ANALYSIS OF ALGORITHMS Page 102

You might also like