Interactive end-of-chapter exercises


Dijkstra's Link State Algorithm - Advanced

Consider the incomplete 6-node network shown below, with the given link costs.

Consider the completed table below, which calculates the shortest distance to all nodes from X:
================================================
|    Node     |    Shortest distance from X    |    Previous Node   |
================================================
       X                                0                                     n/a   
       U                                1                                     X   
       W                               3                                     X   
       Y                                3                                     X   
       V                                5                                     U   
       Z                                6                                     Y   
================================================



Question List


1. For link X, what is the cost associated with this link? If the answer can't be determined given the information, respond with 'n/a'

2. For link Y, what is the cost associated with this link? If the answer can't be determined given the information, respond with 'n/a'




Solution


1. Because the link is never used, we cannot determine the value of X, so the answer is n/a.

2. The prior node in the path to V is U, and we know the shortest distance of both V (5) and U (1), so 5 - 1 = 4 which is Y.



That's incorrect

That's correct

The answer was: n/a

Question 1 of 2

The answer was: 4

Question 2 of 2

Try Another Problem

We gratefully acknowledge the programming and problem design work of John Broderick (UMass '21), which has really helped to substantially improve this site.

Copyright © 2010-2022 J.F. Kurose, K.W. Ross
Comments welcome and appreciated: kurose@cs.umass.edu