I am having difficulty understanding the relationship between the complexity of two classes of problems, say NP-hard and NP-complete problems.
The answer at https://stackoverflow.com/a/1857342/ states:
NP Hard
Intuitively, these are the problems that are at least as hard as the NP-complete problems. Note that NP-hard problems do not have to be in NP, and they do not have to be decision problems.
The precise definition here is that a problem
X
is NP-hard, if there is an NP-complete problemY
, such thatY
is reducible toX
in polynomial time.
If a problem Y
can be reduced to X
in polynomial time, should we not say that Y
is at least as hard as X
? If a problem Y
is reducible to X
in polynomial time, then the time required to solve Y
is polynomial time + the time required to solve X
. So it appears to me that problem Y
is at least as hard as X
.
But the quoted text above says just the opposite. It says, if an NP-complete problem Y
is reducible to an NP-hard problem X
, then the NP-hard problem is at least as hard as the NP-complete problem.
How does this make sense? Where am I making an error in thinking?