Question
Let be a directed, weighted graph with weight function . For some function , for each edge , define as . Which one of the options completes the following sentence so that it is TRUE?
"The shortest paths in under are shortest paths under too, _______"
Official answer and solution
- Official answer
- A
- From
- Official GATE 2020 answer key
Solution
Analyze how telescoping sums affect the total weight of any path under Johnson's reweighting scheme.
Let be any directed path from vertex to vertex in .
Compute the path weight under :
Using the telescoping property of the sum:
Thus:
Significance of the result:
- For any fixed pair of endpoints and , the quantity is an identical constant for EVERY path connecting to .
- Therefore, a path minimizes if and only if it minimizes .
- This holds for every function , without needing any positivity, negativity, or shortest-path distance constraints on .
A
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2020 Computer Science and Information Technology (CS)
- Question
- 50 of 65, printed as CS Q.40
- 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.