Question about NP-Completeness of the Independent Set Problem
I thought that, when proving that a problem P is NP-Complete, we were supposed to reduce a known NPC problem to P. But, looking at the solution to the Independent Set problem, it seems to not go this way.
To prove that Independent Set is NP-Complete, you take a graph G, find its inverse G', and then compute CLIQUE(G'). But, this is doing the other way around: it's taking a problem P I DON'T know if it's NPC and then reduces it to a know NPC problem.
Here's an example of the solution.
What am I missing here? Isn't this w开发者_StackOverflowrong, since it's doing it the other way around?
To prove that P is NP-complete, we need to show two things:
- That P exists in NP.
- That there's a polytime reduction algorithm to reduce some NP-complete problem Q to P.
If we know that CLIQUE is in NPC, then we can easily prove that IS is in NPC.
- We can verify IS trivially in polytime. Iterate vertices, ensure that each has an edge not in the candidate solution.
- We now need to reduce CLIQUE to IS. Given a graph
G
and an integern
, for CLIQUE we want to check if there's a CLIQUE of sizen
. LetH
be the inverse ofG
. If you find an IS inH
of sizen
, you have a CLIQUE of sizen
inG
with the same vertices. We've reduced CLIQUE to IS.
If you were to reduce IS to CLIQUE, you wouldn't prove that either is in NPC unless you could reduce some other problem in NPC to IS.
I think this page may help you http://mlnotes.com/2013/04/29/npc.html
精彩评论