CS FundamentalsHardGATE CS · ISRO Scientist

Link-state routing runs Dijkstra from S on an undirected network with link costs S–A 3, S–B 1, B–A 1, A–C 2, B–C 5, C–D 1, B–D 7, A–D 6. In what order are nodes made permanent, and what is the cost to D?

  1. A. S B A D C; cost 6
  2. B. S B A C D; cost 6
  3. C. S A B C D; cost 5
  4. D. S B A C D; cost 5

Correct answer: D. S B A C D; cost 5

S (0), B (1), then A (2 via B, beating 3 direct), C (4 via A, beating 6 via B), D (5 via C, beating 7 via A and 8 via B). The path is S–B–A–C–D with cost 5.

More Computer Networks questions

Exams that ask this topic