Hide text Hide pseudo-code | |
The task is to solve the single-source shortest-paths problem. The spanning tree is already initialized with the root vertex A, and thus does not containt the edge (A.father, A). Apply the algorithm to the following weighted graph (represented as an adjacency list beside the graphical representation) with the rest of the vertices. In case there exist several items with the same priority, the priority queue behaves like a queue (i.e., the oldest item is removed first). Some additional problems. |
SSSP-Dijkstra(G,root) // G = (V,E,W) |