Arjun Suresh (talk | contribs) (→2 Important Points) |
Arjun Suresh (talk | contribs) (→Somethings to take care of) |
||
Line 16: | Line 16: | ||
===Somethings to take care of=== | ===Somethings to take care of=== | ||
− | *If <math>A</math> is reduced to <math>B</math> and <math>B</math> $\in$ NPC, then <math>A</math> $\in$ <math>NP</math> | + | *If <math>A</math> is reduced to <math>B</math> and <math>B</math> $\in$ <math>NPC</math>, then <math>A</math> $\in$ <math>NP</math> |
**Here, we cannot say <math>A</math> is <math>NPC</math>. All we can say is <math>A</math> cannot be harder than <math>NPC</math> and hence <math>NP</math> (all <math>NPC</math> problems are in <math>NP</math>). To belong to <math>NPC</math>, all <math>NP</math> problems must be reducible to <math>A</math>, which we cannot guarantee from the given statement. | **Here, we cannot say <math>A</math> is <math>NPC</math>. All we can say is <math>A</math> cannot be harder than <math>NPC</math> and hence <math>NP</math> (all <math>NPC</math> problems are in <math>NP</math>). To belong to <math>NPC</math>, all <math>NP</math> problems must be reducible to <math>A</math>, which we cannot guarantee from the given statement. | ||
*If <math>A</math> is reduced to <math>B</math>, <math>C</math> is reduced to <math>A</math> , <math>B \in NP </math> and $C \in$ <math>NPC</math>, then <math>A</math> $\in$ <math>NPC</math> | *If <math>A</math> is reduced to <math>B</math>, <math>C</math> is reduced to <math>A</math> , <math>B \in NP </math> and $C \in$ <math>NPC</math>, then <math>A</math> $\in$ <math>NPC</math> |
$P \subseteq NP \subseteq NPC \subseteq NPH$
Reducing a problem <math>A</math> to problem <math>B</math> means converting an instance of problem <math>A</math> to an instance of problem <math>B</math>. Then, if we know the solution of problem <math>B</math>, we can solve problem <math>A</math> by using it.
You want to go from Bangalore to Delhi and you can get a ticket from Mumbai to Delhi. So, you ask your friend for a lift from Bangalore to Mumbai. So, the problem of going from Bangalore to Delhi got reduced to a problem of going from Mumbai to Delhi.
Consider problems $A$, $B$ and $C$.
Assume all reductions are done in polynomial time
$P \subseteq NP \subseteq NPC \subseteq NPH$
Reducing a problem <math>A</math> to problem <math>B</math> means converting an instance of problem <math>A</math> to an instance of problem <math>B</math>. Then, if we know the solution of problem <math>B</math>, we can solve problem <math>A</math> by using it.
You want to go from Bangalore to Delhi and you can get a ticket from Mumbai to Delhi. So, you ask your friend for a lift from Bangalore to Mumbai. So, the problem of going from Bangalore to Delhi got reduced to a problem of going from Mumbai to Delhi.
Consider problems $A$, $B$ and $C$.
Assume all reductions are done in polynomial time