The number of distinct minimum-weight spanning trees of the following graph is …
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2024 Set 2 · Q59
Time

Your answerNumerical answer
Solution
Official answer: 9
Minimum Spanning TreesWe use Kruskal's algorithm to find the number of distinct minimum spanning trees (MSTs):
Graph properties:
Vertices: , so .
Any spanning tree must contain edges.
Edges of weight 1:
Edges: .
None of these 4 edges form a cycle.
Therefore, all 4 edges must be selected in any MST.
After including these edges, we have 3 connected components:
Edges of weight 2:
Edges connecting component to vertex : (3 choices).
Edges connecting component to vertex : (3 choices).
To connect all 3 components into a single connected tree, we need exactly 2 more edges of weight 2:
One edge from
One edge from
Total number of MSTs:
All selected trees will have the same minimum total weight: .
Try the question first, then check your work.
Examiner trap
All weight 1 edges must be included as they do not form any cycles. Then determine how many independent ways there are to connect the remaining components using weight 2 edges.
This Minimum Spanning Trees previous year question is Q59 of the GATE CSE 2024 Set 2 paper. Find more GATE CSE PYQs on Minimum Spanning Trees in Algorithms, or browse all GATE CSE PYQs.
Free diagnostic
Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Minimum Spanning Trees PYQs now with no account.
An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.
Minimum Spanning Trees has 13 GATE CSE PYQs across 9 papers from 2011 to 2026. 3 of them are 2-mark NAT questions like this one, and GATE CSE 2024 Set 2 has 2.
How GATE tests Minimum Spanning TreesIndependent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.