GATE / CS ARCHIVE

GATE CSE 2001 / QUESTION 15(b)

Count distinct minimum spanning trees

Algorithms · Graph Algorithms · Full GATE CSE 2001 paper

GATE 2001, Q15(b) Descriptive
Report issue

Graph Algorithms

Question 15(b), GATE 2001: Undirected vertices n1,…,n6; edges (n1,n2,2),(n1,n3,8),(n1,n6,3),(n2,n4,4),(n2,n5,12),(n3,n4,7),(n4,n5,9),(n4,n6,4).
Question 15(b), GATE 2001: Undirected vertices n1,…,n6; edges (n1,n2,2),(n1,n3,8),(n1,n6,3),(n2,n4,4),(n2,n5,12),(n3,n4,7),(n4,n5,9),(n4,n6,4).
Question 15(b), GATE 2001: Undirected vertices n1,…,n6; edges (n1,n2,2),(n1,n3,8),(n1,n6,3),(n2,n4,4),(n2,n5,12),(n3,n4,7),(n4,n5,9),(n4,n6,4).
Tap to enlarge
Answer & solution

Answer: 2 (no official key was published)

Step through it (10 steps)

The unique cheapest edge crossing cut {n2} is n1–n2 (2), so every MST contains it. Similarly cut {n6} forces n1–n6 (3), cut {n3} forces n3–n4 (7), and cut {n5} forces n4–n5 (9). These four edges leave two components, {n1,n2,n6} and {n3,n4,n5}. Their cheapest connecting edges are n2–n4 and n6–n4, both weight 4. Either one completes a tree of weight 25; choosing both would create a cycle and require losing a forced edge. Hence there are exactly two MSTs.

Original paper, page 9