Shortest Path Calculator (Dijkstra)

In graph theory, the shortest path problem is the problem of finding a path between two vertices (or nodes) in a graph such that the sum of the weights of its constituent edges is minimized.

For a given source node in the graph, the Dijkstra algorithm finds the shortest path between that node and every other. The idea is to traverse the graph in a way that visited nodes can not be reached through a shorter path. This can be ensured by always following the edge between the visited and unvisited nodes which creates the path with the shortest distance from the source node. The minimum distance to an unvisited node gets always updated when a new node gets visited.

Zoom: 100%
4 4 3 4 4 4ABCDEF