Why does P=NP mean we just need 1 algorithm to solve all the NP problems?
-
I know about P, NP, and NP-complete. As I see it, NP-complete is just a subset of NP, there are problems in NP cannot be reduced to other NP problems. Why does P=NP imply NP=NP-complete?
-
Answer:
Does this help? You must be signed in to read this answer.Connected to GoogleConnected to FacebookBy continuing you indicate that you have read and agree to the . Loading account...Complete Your ProfileFull NameChecking...EmailChecking...PasswordChecking...By creating an account you indicate that you have read and agree to the .
Bret Fontecchio at Quora Visit the source
Other answers
There are no problems in NP that can't be reduced to other problems. By definition, the NP-complete problems are those that every problem in NP reduces to in polynomial time. If we had a polynomial time algorithm for any NP-complete problem, we could make a polynomial time algorithm for any problem in NP by doing the appropriate reduction and then solving the resulting instance.
Justin Rising
To quote the description of the question, "I know about P, NP, and NP-complete. As I see it, NP-complete is just a subset of NP, there are problems in NP cannot be reduced to other NP problems. Why does P=NP imply NP=NP-complete?" First, you are right when you say that NP-complete is just a subset of NP. But it is the hardest subset. So you are wrong when you say that there are problems in NP which cannot be reduced to other NP-complete problems. In fact, every problem in NP can be reduced to every NP-complete problem. That is, every NP-complete problem is at least as hard as every other NP-complete problem, and as a consequence, if you solve any NP-complete problem in polynomial time, you can solve all the problems in NP in polynomial time. Seems like magic when you read it for the first time, but that was the insight of the Cook-Levin theorem, which gave rise to the theory of NP-completeness. Now, i'll give a bird's eye view of what causes the situation described in the paragraph above. We know that we can prove NP-completeness starting from 3-SAT. So we give reductions either from 3-SAT, or from problems, which are already reduced from 3-SAT or problems which were reduced from problems which were reduced from 3-SAT and so on. So this gives us a chain, which says all these problems are at least as hard as 3-SAT. But to show NP-completeness, we also need to show that these problems belong to the class NP. Which essentially means that there exists a Turing Machine which, in simple terms, can guess a solution to the problem and verify it in polynomial time. And this property is common to all the problems in NP. Cook-Levin theorem exploits this fact, and encodes the Turing Machine configurations in an instance of a problem called Circuit-Sat, which in turn reduces to 3-SAT. So what all of this means? This means that all these problems we were proving to be NP-complete, were at least as hard as 3-SAT, and also, 3-SAT is as hard as any problem in NP. This closes the loop, which means all these problems are at least as hard as any problem in NP. To get how a polynomial time algorithm for any of the NP-complete problems (say L) will give polynomial time algorithm for any NP problem (say Q), you need to do the following. We know that if A reduces to B, then a polytime algorithm for B will imply a polytime algorithm for A. Now, since L is NP-complete, 3-SAT must reduce to it (may be via a series of reductions), and Q can be reduced to 3-SAT (explained above). Hence, Q reduces to L, and a polynomial time algorithm for L will imply a polynomial time algorithm for Q. So this tells you why only one polynomial time algorithm (for an NP-complete problem) will prove P=NP, because then all the problems in NP can be solved in polynomial time. The last line of the question does not make much sense, because if P=NP, you can solve all problems in NP-in polynomial time, and hence they are all polynomial time equivalent, so P=NP=NP-complete. Basically, the term NP-complete loses its meaning, mostly because it was invented to capture the hardness of the class NP.
Ashutosh Rai
NP-complete problems are the "hardest" problems in NP set. And they can be converted to each other in P time. This concept is called reductions. When you have the ability to convert one to other in P time then it means if you can find how to solve any of the NP complete problems - by just converting your problem within P time to an instance of the "already solved question" - you end with a total solution time of P_reduction + P_solution_for _the_known_problem... Which is also in P time (addition of two polynomials is yet another polynomial). By this way solving one np complete problem you have the ability to solve all NP problems in P time. And this yields the conjectured hierarchy between NP and P to collapse. (This last sentence was a fancy way to say the two sets, NP and P are equal thus P=NP).
Mehmet Kaplan
It is not literally true that we need only 1 algorithm to solve all NP problems if P=NP. The sense in which the statement has been made ignores the fact that reductions are algorithms as well. Suppose you wanted to use a polynomial algorithm for solving 3SAT to solve Maximum Independent Set (MIS) in a graph. We can reduce MIS to 3SAT and then use the algorithm we have for 3SAT. But in the whole process of solving MIS we were using the reduction to 3SAT which itself is an algorithm. Since the reductions of different problems in NP to 3SAT are different algorithms it is not strictly true that we need only 1 algorithm to solve all of them. Now deriving these reductions can be done in a rather tedious but algorithmic way as described by the Cook-Levin Theorem. Hence if we consider all reductions to arise from a single meta algorithm then we need just 1 algorithm to solve all problems in NP.
Nishanth Dikkala
Related Q & A:
- How To Solve Problems Creatively?Best solution by Quora
- How to solve problems with editing Yahoo toolbar?Best solution by Yahoo! Answers
- Why can't I download MSN messenger 8.1?Best solution by Yahoo! Answers
- Why is it better to have more than 1 satellite?Best solution by Yahoo! Answers
- Do some people just need more sleep than others?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.