CS FundamentalsVery hardGATE CS (PYQ pattern)

An undirected network has links (cost): A-C 3, A-E 2, A-F 3, B-C 2, B-E 2, B-G 2, C-D 5, D-E 1, D-G 3, E-G 4. Link-state routing at A computes shortest paths. How many distinct minimum-cost paths lead from A to G, and what is the minimum cost?

  1. A. 4 paths, cost 6
  2. B. 3 paths, cost 6
  3. C. 3 paths, cost 7
  4. D. 2 paths, cost 5

Correct answer: B. 3 paths, cost 6

Dijkstra from A with path counting (adding counts when an equal-cost relaxation is found) gives cost 6 and 3 minimum-cost paths.

More Computer Networks questions

Exams that ask this topic