A Simpler Algorithm for the All Pairs Shortest Path Problem with O(n2logn) Expected Time

The best known expected time for the all pairs shortest path problem on a directed graph with non-negative edge costs is O(n2 log n) by Moffat and Takaoka. Let the solution set be the set of vertices to which the given algorithm has established shortest paths. The Moffat-Takaoka algorithm maintains complexities before and after the critical point in balance, which is the moment when the size of the solution set is n-n/ log n. In this paper, we remove the concept of critical point and the data structure, called a batch list, whereby we make the algorithm simpler and seamless, resulting in a simpler analysis and speed-up.