Data Structures & AlgorithmsModerateCodeforces Div 2 D · ICPC regional

An undirected graph has the vertices B, C, F, L, O, P, Q, R, V, Z and the edges Q–L, Q–Z, Q–V, B–O, B–L, B–Z, B–R, B–P, O–Z, O–F, O–V, L–P, Z–F, Z–V, R–P, R–C, R–V, P–C, P–V, F–V. What is the size of a maximum independent set (a largest set of vertices with no edge between any two of them)?

  1. A. 5
  2. B. 6
  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