then multiple runs of dijkstra' algorithm can be made to perform with time complexity ( log )and be faster than floyd' algorithm simple example suppose we want to compute the lengths of the shortest paths between all vertices in the following undirected weighted graphwe start with distance matrix based on the connection weightsand trivial predecessorsstart then for each vertex in turn we test whether shortcut via that vertex reduces any of the distancesand update the distance and predecessor arrays with any reductions found the five stepswith the updated entries in quotesare as follows:abca ' ' ' ' ' ' ' 'ae 'ac 'ac 'bb 'bb