CS FundamentalsVery hardGATE CS (PYQ pattern)

A weighted undirected graph on nodes 0..5 has edges (u,v,w): (0,1,1), (1,2,2), (0,2,2), (2,3,3), (1,3,3), (3,4,1), (2,4,4), (4,5,2), (3,5,2). How many different minimum spanning trees does it have?

  1. A. 9
  2. B. 8
  3. C. 16
  4. D. 7

Correct answer: B. 8

The minimum total weight is 9. Ties between equal-weight edges that close a cycle (e.g. 1-2 vs 0-2, 2-3 vs 1-3, 4-5 vs 3-5) give independent choices; enumerating all 5-edge subsets that form a tree gives 8 minimum-weight trees.

More Computer Networks questions

Exams that ask this topic