0

I'm trying to understand the formal definition of NP Complete and had some questions. I was wondering if someone can provide more insight.

The Jon Kleinberg algorithms book says that if every NP problem can be reduced to a problem X, then problem X is in the set NP Complete.

Now since P is a subset of NP, it follows that we can reduce any problem in P to an NP Complete problem in polynomial time. This leads to a contradiction that since the reduction is in polynomial time, we can solve this NP Complete problem in polynomial time. This cannot be true. So I'm not sure where this reasoning is wrong.

Also if we are able to reduce any NP problem in polynomial time to NP Complete, then why do we say that NP Complete is harder. Since the reduction is in polynomial time, asymptotically speaking, it should not make a difference.

AggieMan
  • 84
  • 8

1 Answers1

1

Now since P is a subset of NP, it follows that we can reduce any problem in P to an NP Complete problem in polynomial time. This leads to a contradiction that since the reduction is in polynomial time, we can solve this NP Complete problem in polynomial time.

You get the direction of the reduction wrong. If you can reduce any NP-complete problem to a given P problem, then P = NP, because that means this P problem is harder than or equivalent to any NP-Complete problem. The fact that a P problem can be reduced to NP problems doesn't show that it is harder than NP -- it shows that it's easier than NP, which is not surprising or contradictory.

Pretend that we can reduce shortest path to 1 run of TSP, and pretend that TSP can only be solved by by enumeration (exponential complexity). Then, shortest path is polynomial, the reduction is polynomial (O(1)), but the TSP is not polynomial. This is a hypothetical example. But hopefully, it shows that the fact TSP can solve SP in one run doesn't mean TSP is easy by any measure. The complexity of TSP is not constrained by the fact that it can easily solve SP.

tinlyx
  • 18,900
  • 26
  • 81
  • 148
  • I agree that reducing a P problem to an NP problem means that the NP problem must be harder than the P problem. However, since the reduction is in polynomial time, how much harder is it? The NP problem that the P problem was reduced to, should still be solvable in polynomial time. I'm still trying to understand all this. – AggieMan Jan 22 '16 at 21:05
  • Hmmm. That's a good point @tinlyx. When I look back at my question after reading this explanation it all makes sense. Thanks!!! – AggieMan Jan 22 '16 at 21:38
  • @AggieMan Sure. I am just glad to help. – tinlyx Jan 22 '16 at 21:41