# Would a polynomial-time algorithm for an NP-hard problem implies that P=NP? [duplicate]

An NP-hard problem is not in NP. (If it was in NP, it would be an NP-complete problem not NP-hard.)

So my question is: if someone can find a polynomial-time algorithm for an NP-hard problem, would that means that P=NP?

I think yes (I am almost sure) but I can't find the reason why?

• " I can't find the reason why?" Have you tried looking at the definition of NP-hard? – jmite Mar 5 '16 at 23:12
• And you think I did not look for the definition of NP-hard? – drzbir Mar 5 '16 at 23:15
• @ Dr W : I know the definition of P, NP, NP-complete and NP hard. The question you put does not answer my question. – drzbir Mar 5 '16 at 23:34
• It follows immediately from the definition of NP-hard. A problem is NP hard if it is polytime reducible from every problem in NP. This literally means that, if an NP-hard problem is in P, every problem in NP is also in P, because that's what a polynomial time reduction is. It's not a theorem that needs to be proved or explained, it is true by definition, which is why we kept pointing you at the definition. – jmite Mar 5 '16 at 23:39