Graph Theory37 sections · 1633 units
Open in Course

Quiz: Dijkstra's Greedy Choice

Knowledge check

Check Your Understanding

Dijkstra always extracts the vertex with the smallest tentative distance from the priority queue. Why does this greedy choice guarantee correctness?

  1. A.Because the priority queue sorts edges, not vertices
  2. B.Because all edges have the same weight
  3. C.With non-negative weights, no future path through unvisited vertices can produce a shorter route to the extracted vertex
  4. D.Because Dijkstra processes every edge exactly twice
Start the roadmap to answer the quizzes and solve the challenges