Dijkstra's algorithm solves one-source shortest paths with nonnegative edge weights. This lesson follows the settled labels, then reads the final predecessor tree from the recomputed table.
highlighted = computed this step
Settle labels
Dijkstra starts at A with distance 0 and finishes with every node settled. Motivation: nonnegative weights let the smallest unsettled label become final when it is chosen.
d(A)=0
Final distances
The final distances are 0, 1, 3, 5, 8, and 13. Why: each label is the exact length of the best path certified from A on this graph.
dA,dB,dC,dD,dE,dF=0,1,3,5,8,13
Predecessor tree
The shortest-path tree has 5 predecessor edges, and D's predecessor is B. Interpretation: the predecessor pointers reconstruct the certified paths from A, while the labels give their lengths.
predecessor edges=5
Diagram note
Certificate note: the graph marks node states by role and the table pins the final integer labels. Pixel positions are rounded for layout; every number shown is exact.
Dijkstra labels are exact on this nonnegative graph