Supply Chain LabShortest Path (Dijkstra)Lab Home
Networks · Routing

Shortest Path - Dijkstra's Algorithm

Every delivery route, GPS direction and network flow rests on one idea: the cheapest path between two points. Drop nodes on the map, connect them into a road network, then watch Dijkstra fan out from the origin and lock in the least-cost route.

Build the network

Nodes are junctions; edges are roads with a distance cost.
how fast Dijkstra explores the graph
Nodes0
Edges (roads)0
Origin–
Destination–

Map & result Ready 0 visited

–
Nodes on the route
✋ Click the map to add a node
node origin destination explored by Dijkstra shortest path
Load the sample network and press Find shortest path. Dijkstra always picks the closest un-visited node next, so it never overshoots - that greedy-but-correct choice is why it guarantees the true shortest route.

About this tool

Shortest Path (Dijkstra)

The concept

Dijkstra finds the cheapest route through a network - the atom of all routing.

How it works

Costs propagate outward from the origin; each node keeps its best-known distance.

Winning strategy

Edge costs are the model: put time, money or risk on them and the path answers that question.

iteratively relax edges from cheapest frontier node
DijkstraShortest pathEdge costRouting