To reconstruct the shortest path, you follow the predecessor arrows backward from the destination vertex to the source vertex. During the algorithm's execution, whenever a vertex is selected or updated, an arrow is drawn from the vertex that supplied the current best label.
Conditions: Predecessor arrows must have been recorded during the label updates.; The destination label has been finalized (circled).; The graph is directed or treated as such for the purpose of following the recorded arrows.
To reconstruct the shortest path, you follow the predecessor arrows backward from the destination vertex to the source vertex. During the algorithm's execution, whenever a vertex is selected or updated, an arrow is drawn from the vertex that supplied the current best label.
Conditions: Predecessor arrows must have been recorded during the label updates.; The destination label has been finalized (circled).; The graph is directed or treated as such for the purpose of following the recorded arrows.
The final shortest distance from home to university is 7. This value is determined after all smaller uncircled candidates (specifically vertices E with label 4 and B with label 6) have been processed.
Conditions: The algorithm has processed all vertices with tentative labels smaller than 7.; The label 7 at university is the smallest remaining uncircled label.; The graph edge weights are fixed as shown in the example.
The final shortest distance from home to university is 7. This value is determined after all smaller uncircled candidates (specifically vertices E with label 4 and B with label 6) have been processed.
Conditions: The algorithm has processed all vertices with tentative labels smaller than 7.; The label 7 at university is the smallest remaining uncircled label.; The graph edge weights are fixed as shown in the example.
When a vertex receives multiple distance calculations from different paths, you keep only the smallest value and cross out the larger ones. This ensures that the vertex's label always represents the shortest known distance from the source.
Conditions: A vertex is reachable via multiple paths from different circled vertices.; New distance calculations are performed for an already labeled vertex.
When a vertex receives multiple distance calculations from different paths, you keep only the smallest value and cross out the larger ones. This ensures that the vertex's label always represents the shortest known distance from the source.
Conditions: A vertex is reachable via multiple paths from different circled vertices.; New distance calculations are performed for an already labeled vertex.
The numeric labels at the vertices represent the current best known distance from the source vertex (home) to that specific vertex. A blue circle around a label indicates that this distance has been accepted as final for that vertex in the current run of the algorithm.
Conditions: The demonstration uses a visual whiteboard-style representation.; The source vertex is 'home'.; The algorithm is Dijkstra's shortest path algorithm.
The numeric labels at the vertices represent the current best known distance from the source vertex (home) to that specific vertex. A blue circle around a label indicates that this distance has been accepted as final for that vertex in the current run of the algorithm.
Conditions: The demonstration uses a visual whiteboard-style representation.; The source vertex is 'home'.; The algorithm is Dijkstra's shortest path algorithm.