Data Structures & AlgorithmsHardGATE CS · Codeforces Div 2 B

An undirected graph has the vertices C, E, H, I, M, N, O, R, U, Y and the edges H–R, H–E, H–N, H–M, C–O, C–R, C–E, C–N, C–M, C–Y, C–I, O–N, O–U, O–M, O–Y, R–N, R–M, E–U, E–M, E–Y, N–U, N–I, U–M, U–Y, M–Y, M–I, Y–I. 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. 4
  3. C. 3
  4. D. 5

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

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic