# Proof that **NP=P** implies **NP=NPC** [closed]

As the title says, I am not sure how the former implies the latter. Please someone sketch a few details.

Many thanks

## closed as off-topic by Adam Hughes, Sujaan Kunalan, TravisJ, user99914, graydadMay 14 '15 at 4:30

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Adam Hughes, Sujaan Kunalan, TravisJ, graydad
If this question can be reworded to fit the rules in the help center, please edit the question.

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.

• One still needs to prove that any other NP problems can be reduced in polynomial time to any other NP problems. Isn't that the definition of NPC? – user1819047 May 13 '15 at 22:56
• "Reducible" here means roughly "Given a way to solve problem A, I can solve B in polynomial time". If P = NP, you can already solve B in polynomial time, so it's sort of trivially reducible. – parallaxeffect May 13 '15 at 23:07

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:

• The transformation of the problem can output to any instance of $B$
• The transformation of the solution to the transformed problem can discard that solution and solve the original probelm (which can be done in polynomial time)

This is an example of where being very formalistic, makes life quite hard.