GateAI
Graph Traversals, MSTs and Shortest Paths

GATE CSE 2022 · Q49

MSQ2 marksMedium

Time

Consider a simple undirected weighted graph GG, all of whose edge weights are distinct. Which of the following statements about the minimum spanning trees of GG is/are TRUE?

Select all that applyOne or more correct

Pick every correct option

Solution

Step-by-step verified 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 Paths

Since all edge weights in GG are distinct, GG has a unique Minimum Spanning Tree (MST). Let the edges in increasing order of weight be e1,e2,e3,e4,…e_1, e_2, e_3, e_4, \dots.

  • (A) is TRUE: By Kruskal's algorithm, e1e_1 is always chosen. Since GG is a simple graph, e2e_2 cannot form a cycle with e1e_1 (a cycle requires at least 3 edges in a simple graph). Thus, the edge with the second smallest weight (e2e_2) is always included in the MST.

  • (B) is TRUE: e3e_3 can only create a cycle if e1,e2,e3e_1, e_2, e_3 form a triangle (K3K_3) on 3 vertices. In this case, e3e_3 is discarded. However, since the subgraph spanned by {e1,e2}\{e_1, e_2\} has only 3 vertices, any 4th distinct edge e4e_4 must be incident to at least one new vertex or cannot form a cycle solely with {e1,e2}\{e_1, e_2\} (since a 3-vertex simple graph can have at most 3 edges). Thus, if e3e_3 is rejected, e4e_4 is guaranteed to be accepted. Therefore, one or both of e3e_3 and e4e_4 must belong to the MST.

  • (C) is TRUE: This is the standard Cut Property of MSTs: for any non-trivial cut (S,V∖S)(S, V \setminus S), 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 GG cannot have multiple minimum spanning trees.

Hence, the correct options are A, B, and C.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

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

Where do you stand for GATE?

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.

One GATE CSE PYQ every morning

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 in GATE CSE

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 Paths

More from GATE CSE 2022

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2022 · Q49 · MSQ

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

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.