As the title says, I am not sure how the former implies the latter. Please someone sketch a few details.
Many thanks
As the title says, I am not sure how the former implies the latter. Please someone sketch a few details.
Many thanks
On
By definition $\text{NPC}\subseteq \text{NP}$.
To show the other inclusion, $\text{NP}\subseteq \text{NPC}$, formally we need to find a way to transform any instance of a problem $A\in\text{NP}$ to an instance of any other problem $B\in\text{NP}$ in polynomial time, and transform the solution of the instance of $B$ to a solution of $A$.
But the whole point of that is that the composition of the transformation of the problem, the solution to the $\text{B}$-instance and the transformation of the solution is a polynomial algorithm for solving the original problem. As the original problem can already be solved in polynomial time (as it is in $\text{P}$) we don't really need all that.
If you want to be more formal:
This is an example of where being very formalistic, makes life quite hard.
NPC is the set of all NP problems which would let you solve any other NP problem in polynomial time. If P = NP, then you can already solve any NP problem in polynomial time, so all NP problems are NP-complete.