Dijkstra’s shortest path algorithm
0
5
3
1
3
3
4
9
2
Algorithm
1.
init node costs to
¥
, set
p
= seed point, cost(
p
) = 0
2.
expand
p
as follows:
•
for each of
p
’s neighbors
q
that are not expanded
»
set cost(
q
) = min( cost(
p
) +
c
pq
,
cost(
q
) )
link cost