GATE / CS ARCHIVE

GATE CSE 2024 SET 2 / QUESTION 59

Count MSTs after contracting forced light edges

Algorithms · Graph Algorithms · Full GATE CSE 2024 Set 2 paper

GATE 2024 Set 2, Q59 2 marks · NAT
Report issue

Graph Algorithms

Question 59, GATE 2024: Undirected graph vertices a,b,c,d,e,f,g have weight-1 edges ab,af,cd,de; weight-2 edges ag,bg,fg,cg,dg,eg; weight-3 edges bc,fe; and no others. How many distinct minimum-weight spanning trees exist?
Tap to enlarge
Answer & solution

Official answer: 9

Step through it (11 steps)

Approach: Force uniquely lightest cut edges, contract them, then count independent minimum connections.

1. Derivation. Each weight 1 edge (ab, af, cd, de) is uniquely lightest across the cut isolating its noncentral endpoint b, f, c, e, respectively, so all four occur in every MST. Contracting them gives components L={a, b, f}, R={c, d, e}, and{g}. There are three weight 2 choices linking L to g and three linking R to g. A minimum tree uses one of each, giving 3×3=9 distinct MSTs, each weight 4+2+2=8. Weight3 links L–R cannot improve that value.

2. Explanation and checks. After contraction only three supervertices remain, requiring exactly two additional edges. Connecting g to the left component has three distinct original choices; connecting g to the right has another three. Each pair is acyclic and connects all seven original vertices once the four forced edges are restored. Choosing a weight-3 left–right link instead would require at least one further weight-2 edge and yield total at least nine rather than eight. Therefore it cannot contribute an alternative minimum tree.

Original paper, page 38 · Answer key