Dijkstra’s Algorithm Visualization in the Browser

Matthew Wigginton Conway
Indicatrix
Published in
1 min readDec 26, 2014
visualization of Dijkstra's algorithm

Dijkstra’s algorithm is a method for finding the shortest path through a graph with non-negative edge weights. It is a relatively efficient algorithm, and is guaranteed to find the shortest path (unlike some heuristic algorithms). It’s a fairly simple algorithm, but also one that can be difficult to wrap one’s head around. Descriptions abound on the Internet, and there are a number of videos, and even a few interactive demonstrations, but I thought there needed to be a demonstration that was interactive, worked in modern browsers without a plugin, used a non-trivial graph, and was open source. So I wrote one. A prose description of the algorithm is there; I hope it’s easier to understand with the interactive component. Visualizing algorithms tends to make them easier to understand, as observed by Mike Bostock.

--

--

Matthew Wigginton Conway
Indicatrix

PhD student in Geography at Arizona State (focus on transportation). BA from UC Santa Barbara Geography.