Consider a simple undirected weighted graph G, all of whose edge weights are distinct. Which of the following statements about the minimum spanning trees of G is/are TRUE?
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2022 · Q49
Time
Select all that applyOne or more correct
Solution
Official answer: A) The edge with the second smallest weight is always part of any minimum spanning tree of G.; B) One or both of the edges with the third smallest and the fourth smallest weights are part of any minimum spanning tree of G.; C) Suppose S ⊆ V be such that S ≠ and S ≠ V. Consider the edge with the minimum weight such that one of its vertices is in S and the other in V S. Such an edge will always be part of any minimum spanning tree of G.
Graph Traversals, MSTs and Shortest PathsSince all edge weights in are distinct, has a unique Minimum Spanning Tree (MST). Let the edges in increasing order of weight be .
(A) is TRUE: By Kruskal's algorithm, is always chosen. Since is a simple graph, cannot form a cycle with (a cycle requires at least 3 edges in a simple graph). Thus, the edge with the second smallest weight () is always included in the MST.
(B) is TRUE: can only create a cycle if form a triangle () on 3 vertices. In this case, is discarded. However, since the subgraph spanned by has only 3 vertices, any 4th distinct edge must be incident to at least one new vertex or cannot form a cycle solely with (since a 3-vertex simple graph can have at most 3 edges). Thus, if is rejected, is guaranteed to be accepted. Therefore, one or both of and must belong to the MST.
(C) is TRUE: This is the standard Cut Property of MSTs: for any non-trivial cut , the edge of minimum weight crossing the cut must belong to every MST (and here, the unique MST).
(D) is FALSE: When all edge weights in a connected undirected graph are distinct, the MST is always unique, so cannot have multiple minimum spanning trees.
Hence, the correct options are A, B, and C.
Try the question first, then check your work.
Examiner trap
Consider Kruskal's algorithm and the Cut Property. Remember that graphs with all distinct edge weights always have a unique MST.
This Graph Traversals, MSTs and Shortest Paths previous year question is Q49 of the GATE CSE 2022 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. This is the only 2-mark MSQ among them, and it is the only one in GATE CSE 2022.
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.