Suppose there is a polynomial time reduction from problem $A$ to $B$.
Why is the following false?
If $B$ is NP-hard then $A$ is NP-hard.
Can some explain this intuitively?
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It only takes a minute to sign up.
Sign up to join this communitySuppose there is a polynomial time reduction from problem $A$ to $B$.
Why is the following false?
If $B$ is NP-hard then $A$ is NP-hard.
Can some explain this intuitively?
Let $B$ be a $\mathsf{NP}$-hard problem and $A=\emptyset$. Then $A \le_p B$ (the reduction just maps any instance of $A$ to some fixed "no" instance of $B$). However $A$ cannot be $\mathsf{NP}$-hard since there is no Karp reduction from $\Sigma^* \in \mathsf{NP}$ to $A$.
B being NP-hard does not say anything about A. The problem says that there is a way to reduce A to B in polynomial time.
But on the other hand, it is also not given that A getting reduced to B is the only pathway for solving A. So, there can be other ways of solving A in polynomial time.
Hence, the implication that A is NP-hard is false.
Suppose that all problems in the world could be ranked in terms of difficulty, where higher numbers correspond to more difficult problems.
If $B$ is NP-hard then its ranking is large, $r(B) \geq M$.
If $A$ reduces to $B$ then $A$ is not harder than $B$, that is, $r(A) \leq r(B)$.
Given $r(B) \geq M$ and $r(A) \leq r(B)$, can you conclude any lower bound on $r(A)$?
Concretely, if $r(A) = 0$ then $r(A) \leq r(B)$ yet $r(A) \not\geq r(B)$. This can be realized in the real world by choosing $A$ to be some trivial problem, such as the empty language (all instances are No instances) or the complete language (all instances are Yes instances). Trivial languages are trivially reducible to any language, but they are so trivial that we can be sure that they are not NP-hard (for technical reasons).
If we disallow trivial languages, then we can still take $A$ to be any language in P. Since P is a subset of NP, we know that $A$ reduces to $B$ (this can also be seen directly – a reduction can simply solve $A$ and output one of two fixed instances of $B$), but assuming that P≠NP, $A$ is not NP-hard.
Is the assumption P≠NP really necessary? If P=NP and $A$ is non-trivial then $A$ is trivially NP-hard, since all language in P trivially reduces to any non-trivial language.
Problem: Is a = b? Reduction to bin packing: Assume you have bins of size (a+b)/2. Can one item of size a and one item of size b be packed into 2 bins?
We just reduced a very, very simple problem to an NP-complete problem.