GATE / CS ARCHIVE

GATE CSE 2005 / QUESTION 58

Fixed-size independent-set decision problems

Algorithms · Computational Complexity · Full GATE CSE 2005 paper

GATE 2005, Q58 2 marks · MCQ
Not in GATE 2027 syllabusReport issue

Computational Complexity

Question 58, GATE 2005: Two undirected-graph decision problems: α asks for an independent set of size |V|−4; β asks for an independent set of size 5. A α in P, β NP-complete; B α NP-complete, β in P; C both NP-complete; D both in P. The source says independent set, not clique, for β.
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

For α, an independent set of |V|−4 vertices exists exactly when some four-vertex complement covers all edges (handle |V|<4 separately). Enumerate O(n4) complements and check the remaining edges. For β, enumerate O(n5) five-vertex subsets and test that all ten vertex pairs are nonedges. Both are polynomial-time because 4 and 5 are constants, so D.

An independent set leaves no edge with both endpoints inside it. For α, enumerate every possible four-vertex excluded set and test the remaining induced graph for an edge; O(n⁴(n+m)) is polynomial. For β, enumerate every five-vertex set and test its ten pairs for the absence of edges; O(n⁵) suffices with adjacency lookup. Unlike the NP-complete general independent-set problem, the relevant size or complement size here is a fixed constant, not part of the input. Hence both are in P.

Original paper, page 7