GATE CS 2024 Set 2 — Question 59
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 = .
More questions on Graph Theory (Math)
2024 Set 2 Q3In an engineering college of 10,000 students, 1,500 like neither their core branches nor other…2024 Set 1 Q11Let be a function such that…2024 Set 2 Q12Let and be the following propositions: : Fail grade can be given. : Student scores…2024 Set 1 Q12The product of all eigenvalues of the matrix…2024 Set 1 Q14Consider a permutation sampled uniformly at random from the set of all permutations of…
Practice GATE CS PYQs with adaptive difficulty
Timed practice, skill tracking, and AI explanations — free to start.
Start practicing free