Questions: Dijkstra's Shortest Path Algorithm in Routing

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A student argues that Dijkstra's greedy step — always confirming the minimum-cost tentative node — might miss a cheaper path discovered later through other nodes. Why is this concern unfounded in standard routing networks?

ARouters cache all possible paths, so any missed path is retrieved from cache
BThe priority queue automatically re-examines all tentative nodes after each confirmation
CAll link costs are non-negative, so no path through an unvisited node can be cheaper than a path already confirmed
DIn practice, the greedy step occasionally produces suboptimal results, but the error is negligible
Question 2 Multiple Choice

After running Dijkstra's algorithm, what does a router actually store in its forwarding table for use in packet delivery?

AThe complete shortest-path tree so it can recompute optimal paths on demand for each packet
BOnly the first hop toward each destination — the outgoing interface for each reachable network prefix
CThe complete sequence of routers for every destination path through the network
DThe total cost (distance) to each destination, updated on every packet arrival
Question 3 True / False

In link-state routing with OSPF, every router in the network independently runs Dijkstra's algorithm on the same topology database, each computing a shortest-path tree rooted at itself.

TTrue
FFalse
Question 4 True / False

Dijkstra's algorithm produces correct shortest paths even when some link costs are negative, as long as no cycle in the network has a negative total cost.

TTrue
FFalse
Question 5 Short Answer

Explain why the greedy step in Dijkstra's algorithm — always selecting the minimum-cost tentative node and treating its shortest path as final — is guaranteed to produce correct results in a routing network.

Think about your answer, then reveal below.