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 V:
================================================
|    Node     |    Shortest distance from V    |    Previous Node   |
================================================
       V                                0                                     n/a   
       U                                1                                     V   
       X                                5                                     V   
       W                               6                                     V   
       Y                                7                                     W   
       Z                                14                                   W   
================================================



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. The prior node in the path to Z is W, and we know the shortest distance of both Z (14) and W (6), so 14 - 6 = 8 which is X.

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



That's incorrect

That's correct

The answer was: 8

Question 1 of 2

The answer was: n/a

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