Consider the following weighted digraph. What is the shortest distance between V1 to V5?
Consider the following weighted digraph. What is the shortest distance between V1 to V5?
Edges (from → to, weight): V1 → V2 (30), V2 → V3 (70), V3 → V5 (30), V1 → V4 (50), V4 → V3 (40), V4 → V5 (80), V1 → V5 (120)
Show answerHide answer
Correct answer: (B) 120
Explanation
Path costs: V1→V2→V3→V5 = 130, V1→V4→V3→V5 = 120, V1→V4→V5 = 130 and V1→V5 = 120. The minimum is 120.