Dijkstra's Link State Algorithm (for computing least cost paths)
Consider the 6-node network shown below, with the given link costs.
Using Dijkstra's algorithm, find the least cost path from source node U to all other destinations and answer the following questions
Question List
1. What is the shortest distance to node z and what node is its predecessor? Write your answer as n,p
2. What is the shortest distance to node w and what node is its predecessor? Write your answer as n,p
3. What is the shortest distance to node u and what node is its predecessor? Write your answer as n,p
Solution
1. The minimum distance from node u to node z is 9, and node z's predecessor is node w. The full answer was: 9,w
2. The minimum distance from node u to node w is 5, and node w's predecessor is node v. The full answer was: 5,v
3. The minimum distance from node u to node u is 0, and node u's predecessor is node u. The full answer was: 0,u
That's incorrect
That's correct
The answer was: 9,w
The answer was: 5,v
The answer was: 0,u