| Procedure |
N1 |
D (v), P (V) |
D (W), P (W) |
D (x), P (x) |
D (y), P (y) |
D (z), P (z) |
| 0 |
U |
2, u |
5, u |
1, u |
Infinity |
Infinity |
| 1 |
UX |
2, u |
4, X |
|
2, X |
Infinity |
| 2 |
Uxy |
2, u |
3, y |
|
|
4, y |
| 3 |
Uxyv |
|
3, y |
|
|
4, y |
| 4 |
Uxyvw |
|
|
|
|
4, y |
| 5 |
Uxyvwz |
|
|
|
|
|
D (o): the minimum cost path from the source node to the target node O with the algorithm iteration.
P (o): O from the source node to the target node follows the current lowest cost path of the previous node (O neighbor ).
N1: node subset. If the minimum cost path from the source node to the target node o is known, O is in N1.
LS algorithm:
Initialization:
N1 = {u}
For all node o
If O is a neighbor of u
Then D (o) = C (u, O)
Else d (v) = infinity
Loop
Find w not in N1 such that D (W) is a minium
Add W to N1
Update D (o) for each neighbor O of W and not in N1:
D (o) = min (D (O), D (o) + C (W, O ))
/* New cost to o is either old cost to o or known least path cost to W plus cost from W to O */
UntilN1 = N
Dijkstra link status Routing Algorithm