Gate2020 cs Q36

0. Let G=(V,E) be a directed, weighted graph with weight function w:E→R. For some function f:V→R, for each edge (u,v)∈E, define w′(u,v) as w(u,v)+f(u)−f(v).
Which one of the options completes the following sentence so that it is TRUE ?
“The shortest paths in G under w are shortest paths under w′ too, _________”.

  • Option : A
  • Explanation :
    w(u, v)=(u, v ) edge weight
    w′(u, v) = w(u, v) + [f(u) - f(v)]/0 = w (u, v)
    So, option (A) correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *