←back to thread

108 points BerislavLopac | 1 comments | | HN request time: 0.221s | source
Show context
johanvts ◴[] No.43714905[source]
> NP-hard is the set all problems at least as hard as NP-complete

Im a bit confused by this. I thought NP-complete was the intersection of NP-hard and NP. Maybe this is stating the same?

replies(2): >>43715007 #>>43716558 #
redleader55 ◴[] No.43715007[source]
This [1] diagram from Wikipedia represents you are saying in a visual way. NP-hard and NP-complete are defined as basically an equivalence class modulo an algorithm in P which transforms from one problem to the other. In more human terms both NP-hard and NP-complete are reducible with a polynomial algorithm to another problem from their respective class, making them at least as hard.

The difference between the two classes, again in human terms, is that NP-complete problems are decision problems "Does X have property Y?", while NP-hard problems can include more types - search problems, optimization, etc, making the class NP-hard strictly larger than NP-complete in set terms.

The statement in the article means that NP-hard problems require solving a NP-complete problem plus a P problem - hence being at least as hard.

[1] https://en.m.wikipedia.org/wiki/File:P_np_np-complete_np-har...

replies(2): >>43719030 #>>43722363 #
zahlman ◴[] No.43719030[source]
If NP-hard isn't even a subset of NP, why is it called "NP-hard"?
replies(3): >>43720641 #>>43721218 #>>43721269 #
1. suzumer ◴[] No.43720641[source]
Because a language being NP-hard implies it is at least as hard as the hardest NP problems. For any language that is NP-hard, if one had a turing machine that decided the language, one could construct a polynomial time transformation of any language in NP to the NP-hard language to decide it using the NP-hard turing machine.