next up previous
Next: Up: Previous:

Intermediate Structure Of Shortest Path

An intermediate vertex of a simple path p = <v1, v2, .., vl>is any vertex of p other than v1 and vl.

The Floyd-Warshall (FW) algorithm works by successively reducing the number of intermediate vertices that can occur in a shortest path and its subpaths.

Let graph G = (V, E) have vertices V numbered 1 .. n, V = {1, 2, .., n}, and consider a subset {1, 2, .., k} for some k.

Let p be the minimum weight path from vertex i to vertex j whose intermediate vertices are drawn from {1, 2, .., k}. One of two situations then occur:

1.
k is not an intermediate vertex of p

\(i \stackrel{p}{\leadsto} j\)

contains vertices from {1, 2, .., k-1}

2.
k is an intermediate vertex of p

\(i \stackrel{p_1}{\leadsto} k \stackrel{p_2}{\leadsto} j\)

contains vertices from {1, 2, .., k-1}

p1 is the shortest path from i to k

p2 is the shortest path from k to j

(by Lemma 25.1)


next up previous
Next: Up: Previous: