Shortest Path Using Dijkstra's Algorithm

Initializing live version
Download to Desktop

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



Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.