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?
- A. cost 23 via C
- B. cost 26 via F
- C. cost 21 via C
- 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
- A router has routes for the following prefixes, all pointing to the same next hop: 172.16.0.0/24, 172.16.1.0/24, 172.16.2.0/24…
- A 16-bit Internet checksum is computed over the five 16-bit words 4A3F, B7C1, 2E9D, F05A and 8C13 (hexadecimal): the words are added with…
- A 4-port learning switch has an empty MAC table. Hosts A, B, E, C and D are attached as follows: A and F on port 1 (through a hub), B and…
- A stop-and-wait link carries 1000-byte frames at 2 Mbps with a one-way propagation delay of 20 ms; ACK transmission time is negligible…
- A token bucket has capacity 3 MB, a token arrival rate of 6 MB/s, and starts full. The link allows a maximum output rate of 30 MB/s. For…
- A single-error-correcting Hamming code protects m data bits with r check bits satisfying 2^r >= m + r + 1. How many check bits are needed…