Shortest Paths and Matrices
Explore the different techniques used to implement the shortest paths and matrices algorithm efficiently.
We'll cover the following...
We'll cover the following...
Inner loop of Fischer and Meyer’s all-pairs shortest paths
There is a very close connection (first observed by Shimbel and later independently by Bellman) between computing shortest paths in a directed graph and computing powers of a square matrix. Compare the following algorithm for squaring an matrix with the inner loop of . (We’ve slightly modified the notation in the second algorithm to make the similarity clearer.)
Algorithm
...