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?

Choose one option
Official answer and solution
Official answer
B
From
Official GATE 2025 answer key

Solution

Compare the set of paths between uu and vv in subgraph TT with the set of paths between uu and vv in GG.

Since TT is a spanning tree (a subgraph) of GG, the unique path between uu and vv in TT of weight d2(u,v)d_2(u, v) is also a valid path between uu and vv in GG. Because d1(u,v)d_1(u, v) is the minimum weight over all paths between uu and vv in GG, we always have:

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

(Equality holds when uu and vv are connected by an MST edge, and strict inequality can hold when a non-tree edge provides a shortcut in GG.)

Final answer

Option (B)

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2025 Computer Science and Information Technology - Session 1 (CS1)
Question
18 of 65
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.