# NP-completeness of problem based on non-arbitrary instance

To prove that a problem is NP-complete, one has to show that it is both (a) in NP and that it is (b) NP-hard by reducing a known NP-complete problem to it in polynomial time.

Regarding the reduction, I understand that the instance of the known NP-complete problem must be arbitrary to avoid loss of generalisation.

Does the instance of the target problem also need to be arbitrary or can one assume specific values to its inputs to make the reduction easier?

Also, if one can assume specific values and carry out the reduction/proof, does the proof also hold for an arbitrary instance of the target problem?

From my understanding, if a specific instance of the target problem is proven to be NP-hard via reduction, then an arbitrary instance of the same problem is at least as hard as its specific instance, thus also NP-hard. Is this logically/mathematically sound?

If your reduction from $$A$$ to $$B$$ is $$f$$, then $$f$$ is a function from the set of instances of $$A$$ to the set of instances of $$B$$. The function does not need to be injective nor surjective.
If $$A$$ is a NP-hard problem and you have a (Karp) reduction $$f$$ from $$A$$ to $$B$$, then the restriction of $$B$$ in which the instances are guaranteed to be in the image of $$f$$ is also NP-Hard. Since this is a (not necessarily proper) subset of all instances of $$B$$, the language $$B$$ is also NP-Hard.
• This is genuinely enlightening. So from my understanding of your explanation, one should restrict a family of instances of $B$ under a common rule (or language) and prove that, under this restriction, $A$ can be reduced to $B$ through $f$. Thanks :) May 30 at 18:13
• @pkco1. I prefer to think this way: you just need to come up with a way (a polynomial-time computable function $f$) that transforms an (arbitrary) instance $x$ of $A$ into an instance $y=f(x)$ of $B$ (such that $x$ is a yes-instance iff $y$ is a yes-instance). There is no need to explicitly argue abut which subset of the instances of $B$ you'll actually need to map to (they'll be implicitly defined by $f$ but, if the goal is that of proving the hardness of $B$, you don't need to care about that). May 31 at 7:24