GATE Computer ScienceVery hardGATE CS

A connected weighted undirected graph has vertices 0 to 5 and edges (u, v, weight): (0,1,2), (0,2,2), (1,2,2), (1,3,3), (2,3,3), (2,4,3), (3,4,3), (3,5,4), (4,5,4), (0,5,6). How many different minimum spanning trees does it have?

  1. A. 24
  2. B. 30
  3. C. 36
  4. D. 32

Correct answer: B. 30

The minimum weight is 14, and exhaustive enumeration of all 5-edge spanning trees shows exactly 30 of them reach it. Ties at weights 2, 3 and 4 make many different edge choices equally cheap, so the MST is far from unique.

More Algorithms questions

Exams that ask this topic