

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 6
click for more info
Not enough gems
Cost: 6 gems
1: NP
incomplete
2: Traveling Salesman Problem
incomplete
3: Verify TSP
incomplete
4: TSP Review
incomplete
5: NP-Complete
incomplete
6: Verifying Solutions
incomplete
7: Does P Equal NP?
incomplete
8: The Negative Case
incomplete
9: NP-Hard
incomplete
10: Prime Factorization
incomplete
11: Prime Factoring Review
incomplete
12: Prime Factoring Review
incomplete
13: Subset Sum Problem
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
All NP-complete problems are NP-hard, but not all NP-hard problems are NP-complete. The determining factor between NP-complete and NP-hard is that not all NP-hard problems are in NP.
A problem is
NP-hardif every problem inNPcan be reduced into it in polynomial time.
Compare this to the slightly different definition of NP-complete:
A problem is
NP-completeif it is inNPand every other problem inNPcan be reduced into it in polynomial time.
The difference is that NP-complete problems must be in NP, or in other words, they must be verifiable in polynomial time. NP-hard has no such restriction.