GATE CS 2025 · Set 1 · Graph Traversals (BFS & DFS)

MCQ · 1 mark · Problem PROG-GRPH-0012

Let \(G\) be any undirected graph with positive edge weights, and \(T\) be a minimum spanning tree of \(G\). For any two vertices, \(u\) and \(v\), let \(d_1(u, v)\) and \(d_2(u, v)\) be the shortest distances between \(u\) and \(v\) in \(G\) and \(T\), respectively. Which ONE of the options is CORRECT for all possible \(G\), \(T\), \(u\), and \(v\)?
  1. A
    \(d_1(u, v) = d_2(u, v)\)
  2. B
    \(d_1(u, v) \leq d_2(u, v)\)
  3. C
    \(d_1(u, v) \geq d_2(u, v)\)
  4. D
    \(d_1(u, v) \neq d_2(u, v)\)

Solve it on GATE DA practice →More Graph Theory & Algorithms problems

Show the worked solutionOfficial GATE Answer Key: Option B.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/460072/gate-cse-2025-set-1-question-8

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com