previous | start | next

Shortest Distance: 13

For the frontier vertices V5 and V6 adjacent to V4, updated distances are:

dist(V0, V5) = dist(V0, V4) + dist(V4, V5) = 8 + 3 = 11

dist(V0, V6) = dist(V0, V4) + dist(V4, V6) = 8 + 2 = 10

But wait! dist(V0, V5) was already 9!

So we should not change this distance since the update through the new known vertex does not give a smaller value.



previous | start | next