Data Structures & AlgorithmsHardGATE CS · ICPC regional

An undirected graph has the vertices A, J, L, Q, W, X, Y and the edges L–J, L–X, L–W, L–A, Q–X, Q–A, J–Y, Y–W. What is the size of a maximum independent set (a largest set of vertices with no edge between any two of them)?

  1. A. 3
  2. B. 4
  3. C. 5
  4. D. 6

Correct answer: B. 4

Exhaustive search over subsets gives 4. Picking the currently lowest-degree vertex and deleting its neighbourhood (a common heuristic) gives 3, and n minus the maximum matching gives 4, which is not a general identity.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic