NP Complete NP Hard Classification of problems The
NP Complete NP Hard
Classification of problems The subject of computational complexity theory is dedicated to classifying problems by how hard they are. Different classifications: P. Problems that can be solved in polynomial time. "P" stands for polynomial. NP. This stands for "nondeterministic polynomial time“, where nondeterministic is just a way of talking about guessing a solution. A problem is in NP if you can quickly (in polynomial time) test whether a solution is correct (without worrying about how hard it might be to find the solution). Problems in NP are still relatively easy: if only we could guess the right solution, we could then quickly test it.
Introduction P is set of problems that can be solved by a deterministic Turing machine in Polynomial time. NP is set of decision problems that can be solved by a Non -deterministic Turing Machine in Polynomial time. P is subset of NP (any problem that can be solved by deterministic machine in polynomial time can also be solved by non-deterministic machine in polynomial time).
Introduction NP-hard Problems: A lot of times we can solve a problem by reducing it to a different problem. We can reduce Problem B to Problem A if, given a solution to Problem A, we can easily construct a solution to Problem B. In this case, "easily" means "in polynomial time. ” NP-complete problems are defined in a precise sense as the hardest problems in P. A problem is NP-complete if the problem is both NP-hard, and in NP.
Introduction Examples: NP Hard: Travelling Salesman Problem NP Complete: NP NPC P
- Slides: 5