CS FundamentalsHardProduct-company MCQ pattern
An undirected network has links A–B 4, A–C 1, B–C 2, B–D 5, C–D 8, C–E 10, D–E 2, D–F 6, E–F 3. What is the cost of the shortest path from A to F found by Dijkstra's algorithm?
- A. 14
- B. 15
- C. 13
- D. 10
Correct answer: C. 13
Dijkstra from A: C = 1, B = min(4, 1 + 2) = 3, D = min(3 + 5, 1 + 8) = 8, E = min(1 + 10, 8 + 2) = 10, F = min(8 + 6, 10 + 3) = 13 along A–C–B–D–E–F. 14 is A–B–D–E–F (missing the cheaper route to B through C), 15 is A–C–D–F, and 10 is the distance to E, not F.
More Computer Networks questions
- Match each protocol with its default port. P. SSH Q. SMTP R. SNMP S. DNS 1. 25 2. 22 3. 53 4. 161
- A hub with 3 PCs is plugged into one port of switch S1. S1 also connects 4 PCs directly and one port to router R. R's other interface goes…
- Assertion (A): An ARP request is sent as a layer-2 broadcast, but the ARP reply is normally unicast. Reason (R): The requester does not…
- Assertion (A): DNS uses only UDP, because each query and answer fits in a single datagram. Reason (R): UDP avoids the connection set-up…
- How many of the following statements about DHCP are correct? 1. The DHCPDISCOVER message is broadcast with source IP 0.0.0.0. 2. DHCP…
- How many of the following statements about NAT are correct? 1. NAT breaks the end-to-end principle because outside hosts cannot start…