Dijkstra algorithm is described as follows:
(1) suppose that the edges of the weighted adjacency matrix represent the weighted directed graph, and the edges [i][j] represent the arc.
(2) Select Vj so that D[j]=Min{D[i]|Vi∈V-S}, and Vj is the end point of the shortest path from the currently found VS. Let S = S ∨{ Vj}
(3) Modify the shortest path length from Vs to any vertex Vk in the set V-S ... If d[j]+ edge [j] [k]
Repeat operation (2)(3)***n- 1 time. Thus, the shortest path from Vs to other vertices on the graph is obtained.