Escolar Documentos
Profissional Documentos
Cultura Documentos
Search
Contents
1
Problems
NP
Problems
NP
Complete Problems(N P C )
NP
Hard Problems (N P H )
4.1 Note
Problems
As the name says these problems can be solved in polynomial time, i.e.; O(n) , O( n2 ) or
is a constant.
NP
O(n ) ,
where
Problems
Some think N P as Non-Polynomial. But actually its Non-deterministic Polynomial time. i.e.; these problems
can be solved in polynomial time by a non-deterministic Turing machine and hence in exponential time by a
deterministic Turing machine. In other words these problems can be verified (if a solution is given, say if its
correct or wrong) in polynomial time. Examples include all P problems. One example of a problem not in P but
in N P is Integer Factorization (https://en.wikipedia.org/wiki/Integer_factorization_problem).
NP
Complete Problems(N P C)
Over the years many problems in N P have been proved to be in P (like Primality Testing
(https://en.wikipedia.org/wiki/Primality_test)). Still, there are many problems in N P not proved to be in P .
i.e.; the question still remains whether P = N P (i.e.; whether all N P problems are actually P problems).
Complete Problems helps in solving the above question. They are a subset of N P problems with the
property that all other N P problems can be reduced to any of them in polynomial time. So, they are the
hardest problems in N P , in terms of running time. If it can be showed that any N P C Problem is in P , then
all problems in N P will be in P (because of N P C definition), and hence P = N P = N P C .
NP
NP C
NP
NP C
NP C
NP
Hard Problems (N P H)
These problems need not have any bound on their running time. If any N P C Problem is polynomial time
reducible to a problem X , that problem X belongs to N P Hard class. Hence, all N P Complete problems
are also N P H . In other words if a N P H problem is non-deterministic polynomial time solvable, its a
N P C problem. Example of a N P problem that's not N P C is Halting Problem
(https://en.wikipedia.org/wiki/Halting_problem).
From the diagram, its clear that N P C problems are the hardest problems in
ones in N P H . i.e.; N P N P H = N P C
NP
Note
Given a general problem, we can say its in N P C , if and only if we can reduce it to some N P problem
(which shows its in NP) and also some N P C problem can be reduced to it (which shows all NP problems can
be reduced to this problem).
Also, if a
NP H
problem is in
NP
, then it's N P C