Next:
Up:
Previous:
Dijkstra's Algorithm [1959] (nonnegative weights only)
Q = V
S = {}
repeat
select a vertex u from Q
Use
to update other values
S = S
{u}
until Q = {}
Use priority queue for Q with d(v) as the key
Extract-Min to select from Q
Decrease-Key to change d(v)
Greedy choice for next vertex to add to S (contains vertices whose shortest path is known)
Because of optimal substructure
Next:
Up:
Previous: