0

What are the differences between NP, NP-Complete and NP-Hard?

I am aware of many resources all over the web. I'd like to read your explanations, and the reason is they might be different from what's out there, or there is something that I'm not aware of.

1 Answers1

0

A problem $\Pi$ is $\textrm{NP}$-hard if every problem in $\Pi' \in \textrm{NP}$ can be reduced to $\Pi$ via a Karp reduction $\le_p$, i.e., if $\Pi' \le_p \Pi$.

A problem $\Pi$ is $\textrm{NP}$-complete if it is $\textrm{NP}$-hard and belongs to $NP$.

Intuitively, a $\textrm{NP}$-complete problem is as hard as the hardest problem in $\textrm{NP}$ while a $\textrm{NP}$-hard problem might be even harder.

Finding a polynomial-time algorithm $A$ for any $\textrm{NP}$-hard problem $\Pi$ (therefore also for any $\textrm{NP}$-complete problem) would immediately yield a polynomial-time algorithm for all problems in $\textrm{NP}$: reduce (in polynomial-time) an instance $x$ your problem $\Pi' \in \textrm{NP}$ of choice to an instance $y$ of $\Pi$ and then solve $y$ it using $A$.

Steven
  • 29,419
  • 2
  • 28
  • 49