Fish Touching🐟🎣

NP and P Problem

Jul 17, 2023

The NP-complete problems are the “hardest” in NP.
Informally, a problem is NP-complete if it satisfies two conditions: (1) it’s in NP and (2) if a polynomial-time algorithm exists for the problem, then there is a way to convert every problem in NP into this problem in such a way as to solve them all in polynomial time.
If a polynomial-time algorithm exists for any NP-complete problem—that is, if any NP-complete problem is in P—then P in NP. Because NP-complete problems are the hardest in NP, if it turns out that any problem in NP is not polynomial-time solvable, then none of the NP-complete problems are. A problem is NP-hard if it satisfies the second condition for NP-completeness but may or may not be in NP.