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 x and what node is its predecessor? Write your answer as n,p
2. What is the shortest distance to node v and what node is its predecessor? Write your answer as n,p
3. What is the shortest distance to node y and what node is its predecessor? Write your answer as n,p
Solution
1. The minimum distance from node u to node x is 1, and node x's predecessor is node u. The full answer was: 1,u
2. The minimum distance from node u to node v is 3, and node v's predecessor is node u. The full answer was: 3,u
3. The minimum distance from node u to node y is 4, and node y's predecessor is node x. The full answer was: 4,x
That's incorrect
That's correct
The answer was: 1,u
The answer was: 3,u
The answer was: 4,x