Data Structures & AlgorithmsHardCodeforces Div 2 D · ICPC regional

An undirected graph has the vertices C, F, J, O, U, V, W, X, Z and the edges Z–O, Z–U, Z–C, F–U, F–J, O–J, O–V, O–W, U–W, U–X, U–C, V–W, V–X, V–C, W–X, W–C. What is the size of a maximum independent set (a largest set of vertices with no edge between any two of them)?

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

Correct answer: C. 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