Data Structures & AlgorithmsVery hardGATE CS · Codeforces Div 2 B

An undirected graph has the vertices G, J, K, M, P, U, V, W and the edges W–U, W–J, W–M, W–G, U–V, U–M, V–K, J–G, K–G, P–M, P–G, M–G. 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. 4
  3. C. 6
  4. D. 3

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