iterativer Algorithmus mit Zustandd : V→∪{ + ∞}mathend000#.
d (s) : = 0,∀x≠s : d (x) : = + ∞mathend000#
while es gibt eine Kante
ijmathend000# mit
d (i) + wi, j < d (j)mathend000#
d (j) : = d (i) + wi, jmathend000#
jederzeit gilt die Invariante:
∀x∈Vmathend000#: es gibt einen Weg
von smathend000# nach xmathend000# mit Gewicht d (x)mathend000#