0% found this document useful (0 votes)
50 views1 page

What Are P, NP, NP-complete, and NP-hard? P

P refers to problems that can be solved in polynomial time by a regular computer. NP includes problems that may take exponential time on a regular computer but can be solved in polynomial time on a nondeterministic computer. It is unknown whether P equals NP. NP-hard problems are at least as hard as any problem in NP, as any NP problem can be reduced to an NP-hard problem in polynomial time. NP-complete problems are NP and NP-hard, meaning they are the hardest problems in NP.

Uploaded by

venkat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views1 page

What Are P, NP, NP-complete, and NP-hard? P

P refers to problems that can be solved in polynomial time by a regular computer. NP includes problems that may take exponential time on a regular computer but can be solved in polynomial time on a nondeterministic computer. It is unknown whether P equals NP. NP-hard problems are at least as hard as any problem in NP, as any NP problem can be reduced to an NP-hard problem in polynomial time. NP-complete problems are NP and NP-hard, meaning they are the hardest problems in NP.

Uploaded by

venkat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

What are P, NP, NP-complete, and NP-hard?

P:
The algorithm runs in polynomial time and the problem it solves in class P.
NP:
There are a lot of programs that dont run in polynomial time on a regular computer, but do run
in polynomial time on a nondeterministic Turing machine. These programs solve problems
in NP, which stands for nondeterministic polynomial time. A nondeterministic Turing machine
can do everything as a regular computer and more. This means all problems in P are also in NP.
Some people think P = NP, which means any problem that can be verified in polynomial time,
can also be solved in polynomial time and vice versa. If they could prove this, it would be a
revolution computer science because people would be able to construct faster algorithms for a lot
of important problems.
NP-hard:
What does NP-hard mean? A lot of times you can solve a problem by reducing it to a different
problem. I can reduce Problem B to Problem A if, given a solution to Problem A, I can easily
construct a solution to Problem B. (In this case, "easily" means "in polynomial time.")
If a problem is NP-hard, this means I can reduce any problem in NP to that problem. This
means if I can solve that problem, I can easily solve any problem in NP. If we could solve an
NP-hard problem in polynomial time, this would prove P = NP.
NP-complete:
A problem is NP-complete if the problem is both NP-hard, and NP.

You might also like