GATE / CS ARCHIVE

GATE CSE 2014 SET 1 / QUESTION 38

GATE CSE 2014 Set 1 Q38

Theory of Computation · Complexity & Reductions · Full GATE CSE 2014 Set 1 paper

GATE 2014 Set 1, Q38 2 marks · MCQ
Not in GATE 2027 syllabusReport issue

Complexity & Reductions

Question 38, GATE 2014: Suppose a polynomial-time algorithm finds a largest clique in any graph. Which Venn diagram then describes P, NP and NP-complete (NPC)? A: NP is an outer region containing disjoint P and NPC regions. B: P and NP partially overlap, with NPC in their intersection. C: P=NP is the outer region and NPC is a proper inner subset. D: P=NP=NPC is one region.
Tap to enlarge
Your answer
Answer & solution

Official answer: D

Our answer: C under standard many-one completeness; official D simplifies away trivial languages

1. Method and setup. The optimization algorithm decides whether a clique of size at least k exists, placing the NP-complete decision problem CLIQUE in P. Hence every NP problem becomes polynomial-time decidable. The remaining question is whether all members of P qualify as NP-complete under the chosen reduction convention; trivial languages are the important exception.

2. Work through the result and its assumptions. A polynomial maximum-clique algorithm decides CLIQUE in polynomial time, so NP-completeness implies P=NP. Every nontrivial language in P is then NP-complete: decide an NP source and map yes/no instances to fixed yes/no target strings. But ∅ and Σ* are in P and cannot be NP-hard under many-one reductions because a nontrivial language cannot reduce to either. Thus NPC is a proper subset of P=NP, diagram C. Official D is valid only after excluding these trivial languages or changing the reduction convention; keep this discrepancy explicit.

Original paper, page 17 · Answer key