Definition of Dijkstra's Shortest Path1. To find the shortest path between points, the weight or length of a path is calculated as the sum of the weights of the edges in the path.2. A path is a shortest path is there is no path from x to y with lower weight. 3. Dijkstra's algorithm finds the shortest path from x to y in order of increasing distance from x. That is, it chooses the first minimum edge, stores this value and adds the next minimum value from the next edge it selects. 4. It starts out at one vertex and branches out by selecting certain edges that lead to new vertices. 5. It is similar to the minimum spanning tree algorithm, in that it is "greedy", always choosing the closest edge in hopes of an optimal solution. Characteristics of a Shortest Path Algorithm:Dijkstra's algorithm selects an arbitrary starting vertex and then branches out from the tree constructed so far. Each of the nodes it visits could be in the tree, in the fringes or unseen. The designators:
You may view the shortest path applet by clicking below: |
|
Version JDK 1.2 |