You don’t need to write pseudocode; English description of your algorithm will b
ID: 3607001 • Letter: Y
Question
You don’t need to write pseudocode; English description of your algorithm will be fine.
We are given a directed, weighted graph G = (V, E), where each edge (u, v) E has a weight l(u, v) > 0. Let s and t be two nodes in V . Give an efficient algorithm for finding the shortest path from s to t where you have the option to pick one edge and change its weight to 0. (Hint: you’ll need the following simple but useful observation. For a node v in G, a shortest path from v to t in the weighted graph G is also a shortest path from t to v in the (weighted) reverse graph of G, and vice versa.)
Explanation / Answer
Dijkstra's Algorithm Steps:
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.