1.

Let G = (V, E) be a directed, weighted graph with weight function w:E → ℝ.For some function f:v → ℝ, 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, ______”.

A. for every f: v → ℝ
B. if and only if ∀u ϵ V, f(u) is positive
C. if and only if ∀u ϵ V, f(u) is negative
D. if and only if f(u) is the distance from s to u in the graph obtained by adding a new vertex s to G and edges of zero weight from s to every vertex of G
Answer» B. if and only if ∀u ϵ V, f(u) is positive


Discussion

No Comment Found

Related MCQs