GATE CS 2024 Set 2 — Question 59
Go beyond PYQs with Success TrackerAI-powered personalised practice and doubt support. Unlimited practice on eligible plans; AI usage limits apply.NAT+2 / -0HardTrees & Spanning TreesGraph Theory (Math)Engineering MathematicsKruskal's MSTGreedy AlgorithmsAlgorithms
Algorithms → Graph Theory (Math) → Kruskal's MST
Last updated
Question
The number of distinct minimum-weight spanning trees of the following graph is _________

Correct answer
9 to 9
Solution
To find the number of distinct Minimum Spanning Trees (MSTs), we can use Kruskal's algorithm logic, considering edges in increasing order of weights.Step 1: Edges with weight 1
Edges: , , , .
There are 4 such edges. None of them form a cycle among themselves.
Current components: , , .Step 2: Edges with weight 2
Edges connecting to : connect to . connect to .
We need to connect the three components together. The MST requires edges. We currently have 4 edges. We need 2 more edges.To connect to , we can choose any one edge from the set . All have weight 2. Since they all connect the same two components ( and ), any one of them is valid and will not form a cycle with the others if only one is picked.
Number of choices = 3.To connect to , we can choose any one edge from the set . All have weight 2.
Number of choices = 3.By picking one edge from the first set and one from the second set, we connect , forming a single connected component containing all vertices. No cycles are formed.Step 3: Edges with weight 3
Edges and have weight 3. Since the graph is already connected using weights 1 and 2, adding any weight 3 edge would create a cycle. Thus, no weight 3 edges are included.Total Distinct MSTs
Total combinations = (Choices for connecting to ) (Choices for connecting to )
Total = .
Edges: , , , .
There are 4 such edges. None of them form a cycle among themselves.
- and connect nodes .
- and connect nodes .
Current components: , , .Step 2: Edges with weight 2
Edges connecting to : connect to . connect to .
We need to connect the three components together. The MST requires edges. We currently have 4 edges. We need 2 more edges.To connect to , we can choose any one edge from the set . All have weight 2. Since they all connect the same two components ( and ), any one of them is valid and will not form a cycle with the others if only one is picked.
Number of choices = 3.To connect to , we can choose any one edge from the set . All have weight 2.
Number of choices = 3.By picking one edge from the first set and one from the second set, we connect , forming a single connected component containing all vertices. No cycles are formed.Step 3: Edges with weight 3
Edges and have weight 3. Since the graph is already connected using weights 1 and 2, adding any weight 3 edge would create a cycle. Thus, no weight 3 edges are included.Total Distinct MSTs
Total combinations = (Choices for connecting to ) (Choices for connecting to )
Total = .
Continue learning with Success Tracker
A step still unclear? Work through it with support
Use Success Tracker to ask about the reasoning, then try another GATE CS question to check your understanding.
AI-powered practice· Unlimited practice on eligible plans
- PYQs with solutions
- Attempt available previous-year questions, then compare your reasoning with the worked solution. Coverage varies by stream.
- Practice that adapts
- Choose a topic, work on weaker areas and bookmark questions to revisit. Your attempts feed your progress tracking.
- AI doubt support
- Ask follow-up questions about a step or concept while practising, instead of stopping at the final answer.
Unlimited practice is available on eligible plans. Free practice and AI usage have limits; check the current plan allowances before choosing.
This page stays readable without an account. AI responses can be wrong; check them against the solution and source material.
More questions on Graph Theory (Math)
2026 Set 2 Q3A day can only be cloudy or sunny. The probability of a day being cloudy is , independent of…2026 Set 2 Q5‘When it is raining, peacocks dance.’ Based only on this sentence, which one of the following…2026 Set 2 Q8Figures (i) and (ii) represent intercity highway systems. The black dots represent cities and the…2026 Set 1 Q10An unbiased six-faced dice whose faces are marked with numbers 1, 2, 3, 4, 5, and 6 is rolled twice…2026 Set 2 Q10An unbiased six-faced dice whose faces are marked with numbers 1, 2, 3, 4, 5, and 6 is rolled twice…