Você está na página 1de 2

armiwiki (/wiki/Main_Page)

Search

Contents
1

Problems

NP

Problems

NP

Complete Problems(N P C )

NP

Hard Problems (N P H )
4.1 Note

NP, NP Complete, NP Hard


It might be because of the name but many graduate students find it difficult to understand N P problems. So,
I thought of explaining them in an easy way. (When explanation becomes simple, some points may be lost. So,
please do refer standard text books for more information)

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

All N P C problems are in N P (again, due to N P C definition). Examples of N P C problems


(https://en.wikipedia.org/wiki/List_of_NP-complete_problems)

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

while being the simplest

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

Some Reduction Inferences (/wiki/Some_Reduction_Inferences)


--Arjun (/wiki/User:Arjun) (talk (/wiki/User_talk:Arjun)) 22:48, 16 November 2013 (UTC)

Você também pode gostar