GATE CSE 2020 Q50: Shortest paths under the reweighting w'(u,v) = w(u,v) + f(u) − f(v)
- Algorithms
- 2 marks
- MCQ
- −2/3 if wrong
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, __________".
Try it: multiple choice: exactly one correct option
Show answer and explanation
Answer: A (official GATE 2020 final answer key)
Concept used: Potential reweighting (as in Johnson's algorithm): the terms telescope along any path.
First step: Sum along a path from to : the intermediate values cancel, leaving .
Full step-by-step solution
Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.
Share this question
Source: official GATE 2020 CS question paper and final answer key, organised by IIT Delhi. Question paper · Answer key
More Algorithms PYQs
- 2026 Session 1 · Q17Solve nested recurrences T1 = 4T1(n/2) + T2, T2 = 5T2(n/4) + log n
- 2026 Session 1 · Q41Shortest paths with at most k edges: two statements
- 2026 Session 1 · Q47Condition forcing a vertex into every minimum vertex cover
- 2026 Session 1 · Q49Cycle and cut properties of MSTs with distinct weights
- 2026 Session 1 · Q50Impossible DFS discovery/finish orderings for a DAG edge
- 2026 Session 1 · Q55Properties of 2-colorable (bipartite) graphs