next up previous
Next: Up: Previous:

Notation

*
Algorithms use an adjacency matrix w to represent graphs, where

\begin{displaymath}w_{ij} \;=\; \left\{ \begin{array}{ll} 0 & {\rm if} \;i=j \\ ...
...;i \neq j \;{\rm and}
\;(i,j) \not\in E \\ \end{array} \right.\end{displaymath}

Negative weights are allowed, but not negative cycles.



*
Algorithms output a distance matrix D, where dij is the weight of the shortest path from i to j.

For example, \(d_{ij} \;=\; \delta(i,j)\).



*
Algorithms may also output predecessor matrix $\Pi$, where \(\pi_{ij}\) is NIL if either i=j or there is no path from i to j; otherwise, \(\pi_{ij}\) is the predecessor of j on a shortest path from i.



*
From the predecessor matrix $\Pi$, we can derive the predecessor subgraphs \(G_{\pi, i} \;=\; (V_{\pi, i}, E_{\pi, i})\) for each vertex i $\in$ V as

\begin{displaymath}V_{\pi, i} \;=\; \{j \in V \;\mid\; \pi_{i,j} \neq NIL\} \;\cup\; \{i\}\end{displaymath}


\begin{displaymath}E_{\pi, i} \;=\; \{(\pi_{i,j}, j) \;\mid\; j \in V_{\pi, i}
\;{\rm and} \; \pi_{i,j} \neq NIL\}\end{displaymath}


next up previous
Next: Up: Previous: