Skip to content
GATEiit

GATE CSE 2025 Session 1 Q18: Shortest distances in a graph versus its MST

Question

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 GG, TT, uu and vv?

Try it: multiple choice: exactly one correct option

Select one option
Wrong answer costs 1/3 mark in GATE.
Show answer and explanation

Answer: B (official GATE 2025 final answer key)

Concept used: An MST is a subgraph, and removing edges can never shorten a shortest path.

First step: The tree path from uu to vv is also a path in GG, so the shortest path in GG is at most as long.

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

WhatsAppDownload image

Source: official GATE 2025 Session 1 CS question paper and final answer key, organised by IIT Roorkee. Question paper · Answer key