Question
Let be a weighted connected undirected graph with distinct positive edge weights. If every edge weight is increased by the same value, then which of the following statements is/are TRUE?
: Minimum spanning tree of does not change
: Shortest path between any pair of vertices does not change
Official answer and solution
- Official answer
- A
- From
- Official GATE 2016 answer key
Solution
Analyze how an additive edge weight transformation affects spanning tree weights versus path weights with differing hop counts.
Let be a connected undirected graph with vertices. Suppose every edge weight is transformed to for a constant .
Evaluate Statement (Minimum Spanning Tree):
Every spanning tree of contains exactly edges. If is any spanning tree, its new weight is:
Because the weight of EVERY spanning tree increases by the exact same constant , the relative ordering of all spanning trees is completely preserved. The tree that minimized will also minimize . Thus, the MST does not change. Statement is TRUE.
Evaluate Statement (Shortest Paths):
Unlike spanning trees, different paths between a pair of vertices and can have different numbers of edges (hop counts). If path has 1 edge and path has 3 edges:
For example, if and , is initially the shortest path ().
If , then , while . Now is shorter ().
Thus, the shortest path can change. Statement is FALSE.
Therefore, only Statement is true.
A
Assuming that because edge weights are increased monotonically, the shortest path must also remain unchanged, overlooking path length dependence on edge counts.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2016 Computer Science and Information Technology (CS) Session 1
- Question
- 24 of 65, printed as CS Q.14
- 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.