A Faster Algorithm for the All-Pairs Shortest Path Problem and Its Application

We design a faster algorithm for the all-pairs shortest path problem under the RAM model, based on distance matrix multiplication (DMM). Specifically we improve the best known time complexity of O(n 3(loglog n/log n)1/2) to T(n)=O(n 3(loglog n)2/log n). We extend the algorithm to a parallel algorithm for DMM, whose time complexity is O(log n) and number of processors is T(n)/log n. As an application, we show how to speed up the algorithm for the maximum subarray problem.