The number of distinct minimum spanning trees for the weighted graph below is 1cm
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2014 Set 2 · Q52
Time

Your answerNumerical answer
Solution
Official answer: 6
Graph Traversals, MSTs and Shortest PathsTo find the number of distinct Minimum Spanning Trees (MSTs) using Kruskal's algorithm:
Edges of weight 1:
There are 5 edges of weight 1 in the graph (4 in the left subcomponent and 1 in the right triangle).
These edges do not form any cycles among themselves, so all 5 edges with weight 1 must be included in every MST.
Edges of weight 2:
The connected components formed after selecting all weight-1 edges need to be connected using edges of weight 2 without creating cycles.
The bridge between the two components has a single connecting path using weight-2 edges.
In the right-hand triangle, with the weight-1 edge already chosen, we have a choice of weight-2 edges to complete the connections.
In the left component, there are 3 distinct independent choices to connect the remaining vertices using weight-2 edges.
In total, there are distinct combinations of weight-2 edges that span all vertices while maintaining minimum total weight.
Therefore, the number of distinct MSTs is 6.
Try the question first, then check your work.
Examiner trap
First, select all possible edges of weight 1 that do not form a cycle. Then, calculate how many combinations of weight 2 edges can connect the remaining components.
This Graph Traversals, MSTs and Shortest Paths previous year question is Q52 of the GATE CSE 2014 Set 2 paper. Find more GATE CSE PYQs on Graph Traversals, MSTs and Shortest Paths 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 Graph Traversals, MSTs and Shortest Paths 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.
Graph Traversals, MSTs and Shortest Paths has 7 GATE CSE PYQs across 7 papers from 2014 to 2025. 4 of them are 2-mark NAT questions like this one, and it is the only one in GATE CSE 2014 Set 2.
How GATE tests Graph Traversals, MSTs and Shortest PathsIndependent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.