Professional Documents
Culture Documents
CAP538 Unit 6
CAP538 Unit 6
Unit 6
Non-Deterministic Algorithms
What are NP, P, NP-complete, and NP-
Hard problems?
Example:
1. Decision problems.
2. Regular graphs.
NP-Hard Problems
• A problem is NP-Hard if it follows property 2 mentioned previously
and doesn’t need to follow property 1. Therefore, the NP-Complete set
is also a subset of the NP-Hard set.
Example :
1. Hamiltonian cycle .
2. Optimization problem .
3. Shortest path
P, NP, NP-Complete and NP-Hard
NP-Hard Problem
Cook’s Theorem
In computational complexity theory, the Cook–Levin theorem,
also known as Cook’s theorem, states that the Boolean
satisfiability (SAT) problem is NP-complete.
Stephen Cook and Leonid Levin proved that the SAT is NP-
complete.
Cook Said : SAT is NP-Complete
Cook demonstrated the reduction of other hard problems to
SATs.
CNF Form :
( 𝐴 ∨ 𝐵 ) ∧( 𝐴 ∨ 𝐵)
Cook Said : SAT is NP-Complete
3. 3-CNF-SAT(3-SAT): This problem is another variant where the
additional restriction is that the expression is in a conjunctive
normal form and that every clause should contain exactly three
literals. This problem is also about assigning n assignments of
truth values to n variables of the Boolean expression such that
the output of the expression is true. In simple words, given an
expression in 3-CNF, a 3-SAT problem is to check whether the
given expression is satisfiable.
3-CNF Form :