Dijkstra’s Shortest Path
Dijkstra’s Shortest Path
Place the starting vertex A into the SP tree;
For all vertices y adjacent to A
Add y to the FRINGE_SET;
For each element y in the FRINGE_SET
Set the weight of y to the weight of the edge xy;
Set parent[y] to x;
While ending vertex B is not in the SP tree and
FRINGE_SET is not empty do
Execute_Loop Body;
End While
If B is not in the SP Tree
Print Error Message
Else
Print contents of SP tree
End If