Skip to content
Official PYQ · 2025

GATE CS 2025 Set 1 Q8 — Minimum Spanning Trees

Explain with AI

Let GG be any undirected graph with positive edge weights, and TT be a minimum spanning tree of GG. For any two vertices, uu and vv, let d1(u,v)d_{1}(u, v) and d2(u,v)d_{2}(u, v) be the shortest distances between uu and vv in GG and TT, respectively. Which ONE of the options is CORRECT for all possible G,T,uG, T, u and vv ?

Choose one option
View worked solution

Answer: B

To find the correct relationship between d1(u,v)d_1(u, v) and d2(u,v)d_2(u, v), let us analyze the properties of the graph GG and its minimum spanning tree TT:

  1. Subgraph Relationship: By definition, a spanning tree TT is a subgraph of GG (T⊆GT \subseteq G). This means every edge present in TT is also present in GG, and any path between two vertices in TT is also a valid path in GG.
  2. Shortest Path Definition:
    • d2(u,v)d_2(u, v) is the length of the unique path between uu and vv in TT.
    • d1(u,v)d_1(u, v) is the length of the shortest path between uu and vv in GG, which is computed by taking the minimum weight over all possible paths between uu and vv in GG.

Since the path in TT is just one of the many possible paths available in GG, the shortest path in GG can never be longer than the path in TT. Therefore, we must have:

d1(u,v)≤d2(u,v)d_1(u, v) \leq d_2(u, v)

Counterexample for other options:

Consider a triangle graph GG with vertices A,B,CA, B, C and edge weights:

  • w(A,B)=1w(A, B) = 1
  • w(B,C)=1w(B, C) = 1
  • w(A,C)=1.5w(A, C) = 1.5

The minimum spanning tree TT consists of the edges (A,B)(A, B) and (B,C)(B, C) with a total weight of 22.

  • For u=Au = A and v=Cv = C:
    • In GG, the shortest path is the direct edge ACAC, so d1(A,C)=1.5d_1(A, C) = 1.5.
    • In TT, the unique path is A→B→CA \to B \to C, so d2(A,C)=1+1=2d_2(A, C) = 1 + 1 = 2.
    • Here, d1(A,C)<d2(A,C)d_1(A, C) < d_2(A, C), which disproves options A and C.
  • For u=Au = A and v=Bv = B:
    • In GG, d1(A,B)=1d_1(A, B) = 1.
    • In TT, d2(A,B)=1d_2(A, B) = 1.
    • Here, d1(A,B)=d2(A,B)d_1(A, B) = d_2(A, B), which disproves option D.

Thus, only option B is correct for all possible graphs and vertices.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Minimum Spanning Trees questions