Arc lengths 1 2 3 4 5 6 7 1 1000 2 4 10 1000 1000 1000 2 1000 1000 1000 11 5 1000 1000 3 1000 1000 1000 3 1000 1 1000 4 1000 1000 1000 1000 8 7 1000 5 1000 1000 1000 1000 1000 1000 6 6 1000 1000 1000 1000 1000 1000 9 7 1000 1000 1000 1000 1000 1000 1000 Arc included in the shortest path from 1 to 7 1 2 3 4 5 6 7 1 0 1 0 0 0 0 0 1 2 0 0 0 0 1 0 0 1 3 0 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 1 1 6 0 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 length of the shortest path connecting nodes 1 and 7 13