I was searching the difference between NP and NP-complete problems. I came upon this great answer in StackOverflow by Jason. About NP-complete problems, he said
An NP problem X for which it is possible to reduce any other NP problem Y to X in polynomial time. Intuitively this means that we can solve Y quickly if we know how to solve X quickly. Precisely, Y is reducible to X if there is a polynomial time algorithm f to transform instances x of X to instances y = f(x) of Y in polynomial time with the property that the answer to x is yes if and only if the answer to f(x) is yes.
My question is: which one is the NP-complete problem, X or Y?
The NP-complete language is X. The idea is that you can start with an arbitrary NP language Y and, in polynomial time, reduce it to X.
Formally, the definition of NP-completeness is as follows: A language X is called NP-complete iff
That said, it is possible to reduce any NP-complete language to any other NP-complete language, so if Y polynomial-time reduces to X and X is NP-complete, it is possible (but not necessary) for Y to be NP-complete. However, it is known that if Y reduces in polynomial time to X, that Y has to be an element of NP.
Hope this helps!
Both or neither. This process is called Karp reduction and the point is that any NP-complete problem can be transformed into any other NP-complete problem in polynomial time.
NP-complete problems are only a subset of NP problems however. (As of our current understanding, they are the same thing if P=NP.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With