Question
Let be any undirected graph with positive edge weights, and be a minimum spanning tree of . For any two vertices, and , let and be the shortest distances between and in and , respectively. Which ONE of the options is CORRECT for all possible , , and ?
Official answer and solution
- Official answer
- B
- From
- Official GATE 2025 answer key
Solution
Compare the set of paths between and in subgraph with the set of paths between and in .
Since is a spanning tree (a subgraph) of , the unique path between and in of weight is also a valid path between and in . Because is the minimum weight over all paths between and in , we always have:
(Equality holds when and are connected by an MST edge, and strict inequality can hold when a non-tree edge provides a shortcut in .)
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.