Please can someone confirm that my description of the application of Dijkstra's algorithm is correct for this graph?
1 3 A -- B -- C \ / 2 \ / 1 \ / D Step Current Node B C D 1 A 1(A) - 2(A) 2 B 1(A) 4(B) 2(A) 3 D 1(A) 3(D) 2(A) 4 C 1(A) 3(D) 2(A)
- Tentative distances to
Cnot yet visible.
- Shortest distance from previous step taken. No new information on shortest path to
B. Tentative distance to
Cnow known. No new information on
- We choose to backtrack to
A, and then move to
Dbecause the distance to
D(2) is smaller than that to
C(4). We update the tentative distance to
Dit is shorter than via
- We choose to move to
Dbecause it is shorter (3) than backtracking and going via
A(4). Moving to
Cgives us no new shorter distances. All nodes visited, so end.