Data Structures & AlgorithmsHardGATE CS · ICPC regional

An undirected graph has the vertices F, J, K, M, S, T, V, X and the edges J–V, J–X, J–F, J–M, J–K, V–F, V–S, X–F, X–M, X–K, F–K, S–M. 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. 5
  3. C. 6
  4. D. 4

Correct answer: D. 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 5, which is not a general identity.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic