GATE / CS ARCHIVE

GATE CSE 2014 SET 2 / QUESTION 52

GATE CSE 2014 Set 2 Q52

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

GATE 2014 Set 2, Q52 2 marks · NAT
Report issue

Graph Algorithms

Question 52, GATE 2014: How many distinct MSTs does the illustrated undirected weighted graph have? Textual equivalent: label left cluster vertices A top-left, B top-right, C middle-left, D center, E middle-right, F bottom-left; right triangle G bottom-left, H top, I bottom-right. Edges: AB=2, AC=2, AD=1, BD=2, BE=1, CD=2, CF=1, DE=2, DF=1, FG=2, GH=2, HI=1, GI=2. No other edges exist.
Tap to enlarge
Answer & solution

Official answer: 6

Step through it (15 steps)

1. Set up the reasoning. Run Kruskal by weight groups. Weight-one edges AD,BE,CF,DF,HI form a forest, so include them and contract each connected component before counting choices among weight-two edges.

2. Derive the result. The weight 1 edges form an acyclic forest and all are included before any weight 2 edge by Kruskal. In the left component, contraction leaves three parallel weight 2 choices joining its two weight 1 components. The long horizontal bridge of weight 2 is mandatory. In the right triangle, the weight 1 edge is mandatory and either of the two weight 2 edges connects the third vertex. Thus independent choices give 3·2=6 MSTs. The remaining left weight 2 edges internal to contracted components cannot be used.

3. Check the interpretation. After contraction, the left cluster has three parallel choices AB,BD,DE between its two components. FG is the only connection to the right cluster and is compulsory. On the right choose GH or GI. The independent choices yield 3×1×2 trees, each with eight edges and total weight 11.

Original paper, page 43 · Answer key