Professional Documents
Culture Documents
Computational Complexity Classes: An Overview of P - NP
Computational Complexity Classes: An Overview of P - NP
Before jumping to complexity classes, we need to first understand what a Turing machine is.
A Turing machine is a theoretical machine that manipulates symbols on a strip of tape
according to a table of rules. Despite its simplicity, a Turing machine can be adapted to
simulate the logic of any computer algorithm and is particularly useful in explaining the
functions of a CPU inside a computer.
𝑃𝑃 and 𝑁𝑁𝑁𝑁 are two basic complexity classes. 𝑃𝑃 contains all decision problems that can be
solved by a deterministic Turing machine using a polynomial amount of computation time.
𝑁𝑁𝑁𝑁 is the set of decision problems for which the problem instances, where the answer is
“yes”, have proofs verifiable in polynomial time by a nondeterministic Turing machine.
It is easy to see that the complexity class 𝑃𝑃 (all problems solvable, deterministically, in
polynomial time) is contained in 𝑁𝑁𝑁𝑁 (problems where solutions can be verified in polynomial
time), because if a problem is solvable in polynomial time, then a solution is also verifiable in
polynomial time by simply solving the problem.
Apart from 𝑃𝑃, it is believed that there are other problems in 𝑁𝑁𝑁𝑁, the hardest of which are
called 𝑵𝑵𝑵𝑵-complete problems. No polynomial-time algorithm has yet been discovered for
any 𝑁𝑁𝑁𝑁-complete problem, nor has anybody yet been able to prove that no polynomial-time
algorithm exists for any of them (𝑃𝑃 versus 𝑁𝑁𝑁𝑁 problem). The interesting part is, if any one of
the 𝑁𝑁𝑁𝑁-complete problems can be solved in polynomial time, then all of them can be.
In computational complexity theory, 𝑁𝑁𝑁𝑁-hardness (nondeterministic polynomial time
hardness) is the defining property of a class of problems that are informally “at least as hard
as the hardest problems in 𝑁𝑁𝑁𝑁”. A problem 𝐻𝐻 is 𝑵𝑵𝑵𝑵-hard when every problem 𝐿𝐿 in 𝑁𝑁𝑁𝑁 can
be reduced in polynomial time to 𝐻𝐻; that is, assuming a solution for 𝐻𝐻 takes unit time, 𝐻𝐻's
solution can be used to solve 𝐿𝐿 in polynomial time.
References:
1. Complexity class - Wikipedia. https://en.wikipedia.org/wiki/Complexity_class
2. Halting Problem in Theory of Computation - GeeksforGeeks.
https://www.geeksforgeeks.org/halting-problem-in-theory-of-computation/
3. Deterministic and Nondeterministic Turing Machine ....
https://link.springer.com/referenceworkentry/10.1007%2F978-1-4020-8265-8_200983
4. P (complexity) - Wikipedia. https://en.wikipedia.org/wiki/P_(complexity)
5. NP (complexity) - Wikipedia. https://en.wikipedia.org/wiki/NP_(complexity)
6. NP-Completeness | Set 1 (Introduction) - GeeksforGeeks.
https://www.geeksforgeeks.org/np-completeness-set-1/