Dijkstra’s Shortest Path Tree Algorithm

This animation allows you to step through Dijkstra’s Shortest Path Tree algorithm.

First, draw a graph just as in Graph Explorer, and select a root node by clicking it and pressing [R]. Press [W] to assign random weights to the edges (if you don’t like the weights you got, press [W] until you get ones you’re happier with).

Pressing [A] brings up an outline of the algorithm at the left; [Space] steps through the algorithm, illustrating each step on the graph and with variables indicated above.