GATE CSE 2021 Set 1 Q27: Number of minimum spanning trees of a 3×3 grid graph
- Algorithms
- 1 mark
- NAT
- No negative marking
Question
Consider the following undirected graph with edge weights as shown:
The number of minimum-weight spanning trees of the graph is ________.

Try it: numerical answer: type the value
Numerical answer. No negative marking.
Show answer and explanation
Answer: 3 (official GATE 2021 final answer key)
Concept used: Kruskal's algorithm: count the ways of choosing among equal-weight edges that close no cycle.
First step: Add all 0.1 edges first: they form two components (the top row, and the bottom two rows). Then count the 0.9 edges that can join them.
Full step-by-step solution
Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.
Share this question
Source: official GATE 2021 Set 1 CS question paper and final answer key, organised by IIT Bombay. Question paper · Answer key
More Algorithms PYQs
- 2026 Session 1 · Q17Solve nested recurrences T1 = 4T1(n/2) + T2, T2 = 5T2(n/4) + log n
- 2026 Session 1 · Q41Shortest paths with at most k edges: two statements
- 2026 Session 1 · Q47Condition forcing a vertex into every minimum vertex cover
- 2026 Session 1 · Q49Cycle and cut properties of MSTs with distinct weights
- 2026 Session 1 · Q50Impossible DFS discovery/finish orderings for a DAG edge
- 2026 Session 1 · Q55Properties of 2-colorable (bipartite) graphs