Content deleted Content added
added proof sketch |
fixing proof of correctness |
||
Line 21:
== Proof of the Algorithm ==
{{msg:inuse}}
The correctness of the algorithm can be shown by [[mathematical induction|induction]]. The precise statement shown by induction is:
'''Lemma'''. After ''i'' steps, Distance(u) is
The correctness of the algorithm follows from the lemma together with the observation that shortest path between any two vertices must contain at most ''V(G)'' edges. (If a path contained more than ''V(G)'' edges, it must contain some vertex ''v'' twice. Then, it can be shortened by removing the part between the first occurance of ''v'' and the second occurance. This means that it was not the shortest path.)
== Applications in routing ==
|