next up previous
Next: Similarity to Matrix Multiplication Up: No Title Previous: No Title

ALL PAIR SHORTEST PATH

1. Bellman-Ford (adj. list representation) n times tex2html_wrap_inline203 for dense graphs

2. Dijkstra's tex2html_wrap_inline205 for dense graphs
(priority queues of edges) tex2html_wrap_inline207 for sparse graphs

We will do 2 dynamic programming algorithms with tight nodes (small coefficients) on tex2html_wrap_inline209 and another
with tex2html_wrap_inline211
Goal: Create n x n matrix of shortest-path distances tex2html_wrap_inline215
Graph Representation (adj. matrix)
tex2html_wrap_inline217 of edge weights.
tex2html_wrap_inline219
Let tex2html_wrap_inline221 weight of shortest path from i to j that uses at most m edges

tex2html_wrap_inline225 , else tex2html_wrap_inline227

figure31

tex2html_wrap_inline229
tex2html_wrap_inline231
tex2html_wrap_inline233
Answer: tex2html_wrap_inline235
Pseudo-code for "Relaxation Step"
for tex2html_wrap_inline237
if tex2html_wrap_inline239 then tex2html_wrap_inline241

Time tex2html_wrap_inline243





Shekib Yonis
Tue Nov 17 14:10:00 EST 1998