CS FundamentalsHardGATE CS

A link-state network has these bidirectional link costs: A-B 7, A-C 9, A-F 14, B-C 10, B-D 15, C-D 11, C-F 2, D-E 6, E-F 9, E-G 3, D-G 14. Router A runs Dijkstra's algorithm. What are the cost of its shortest path to G and the next hop A uses for G?

  1. A. cost 23 via C
  2. B. cost 26 via F
  3. C. cost 21 via C
  4. D. cost 26 via B

Correct answer: A. cost 23 via C

The shortest path is A-C-F-E-G with cost 23, so A forwards via C. The fewest-hop path A-F-E-G costs 26, and hop count is not the metric.

More Computer Networks questions

Exams that ask this topic