Dijkstra's Shortest Path Screensaver
The Dijkstra's Shortest Path screensaver runs a real live Dijkstra's algorithm on a random weighted graph, showing the expanding wavefront of confirmed shortest distances. It is free, runs in your browser, and ESC exits.
How the Dijkstra's Shortest Path screensaver works
The saver generates a real random graph of nodes and weighted edges, then runs Dijkstra's algorithm from a single source node.
Each step pulls the real closest unvisited node from the frontier, locks in its shortest distance, and relaxes its neighbors' distances.
The locked-in shortest-path tree grows outward frame by frame, exactly as the real algorithm computes it, node by node.
Once every reachable node is finalized, the graph fades and a fresh random graph and source node begin.
A worked example
A node just three hops away but behind a costly edge gets its shortest distance locked in later than a farther node reached by cheaper edges, exactly matching real weighted-shortest-path behavior.
Settings & tips
- Accent recolours the confirmed shortest-path tree.
- The graph and edge weights are real and randomized every run.
- A fresh graph generates automatically once every node is finalized.
Frequently asked questions
- Is this the real Dijkstra's algorithm?
- Yes — a real, correct implementation, run live on a randomized weighted graph.
- What does the wavefront represent?
- The real, growing set of nodes whose shortest distance from the source has been finalized.
- Is a key needed?
- No — it is a pure local computation.
- Is it free?
- Yes — free, no download, in your browser.