Dijkstra's algorithm finds the shortest-path spanning tree of a connected graph starting at a given vertex: the unique path in the tree from the starting vertex to any other vertex is the shortest path in the graph between those vertices. If you are interested only in the shortest path to a particular vertex, the algorithm can be stopped once that vertex is reached. The numbers in parentheses at each vertex are called labels. Initially, the starting vertex has a label of 0, and all other vertices are labeled with ... . At each stage, the algorithm selects a previously unselected vertex with a minimal label. That vertex and its label turn red (and are added to the tree indicated by blue edges). That label will no longer change and is the length of the shortest path in the graph from the starting vertex to that particular vertex. Other labels are updated to reflect the distance to the corresponding vertex using a path only through previously selected vertices. Weights for the edges are generated at random, but a fixed set of weights is included to have a repeatable example.


    Education Levels:


      EUN,LOM,LRE4,work-cmr-id:262498,http://demonstrations.wolfram.com:http://demonstrations.wolfram.com/DijkstrasAlgorithm/,ilox,learning resource exchange,LRE metadata application profile,LRE


      Access Privileges:

      Public - Available to anyone

      License Deed:

      Creative Commons Attribution 3.0


      This resource has not yet been aligned.
      Curriki Rating
      'NR' - This resource has not been rated
      'NR' - This resource has not been rated

      This resource has not yet been reviewed.

      Not Rated Yet.

      Non-profit Tax ID # 203478467