Shortest Path Using Dijkstra's Algorithm
Requires a Wolfram Notebook System
Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.
Dijkstra's algorithm provides a solution to a shortest path problem. This Demonstration shows an adjacency matrix with selected starting and ending points of a path. The algorithm builds up an adjacency tree step by step until the graph is exhausted or the ending point is reached. The shortest path and the distance traveled are returned. The graph is represented by a grid in which each square box is a node connected to its closest neighbors by its sides, equivalent to bidirectional arcs.
Contributed by: Gerard Balmens (August 27)
Open content licensed under CC BY-NC-SA
Details
Snapshots
Permanent Citation