Computing the diameter polynomially faster than APSP
Abstract
We present a new randomized algorithm for computing the diameter of a weighted directed graph. The algorithm runs in time, where is the exponent of fast matrix multiplication, is the number of vertices of the graph, and the edge weights are integers in . For bounded integer weights the running time is and if it is . This is the first algorithm that computes the diameter of an integer weighted directed graph polynomially faster than any known All-Pairs Shortest Paths (APSP) algorithm. For bounded integer weights, the fastest algorithm for APSP runs in time for the present value of and runs in time if . For directed graphs with {\em positive} integer weights in we obtain a deterministic algorithm that computes the diameter in time. This extends a simple algorithm for computing the diameter of an {\em unweighted} directed graph to the positive integer weighted setting and is the first algorithm in this setting whose time complexity matches that of the fastest known Diameter algorithm for {\em undirected} graphs. The diameter algorithms are consequences of a more general result. We construct algorithms that for any given integer , report all ordered pairs of vertices having distance {\em at most} . The diameter can therefore be computed using binary search for the smallest for which all pairs are reported.
Cite
@article{arxiv.1011.6181,
title = {Computing the diameter polynomially faster than APSP},
author = {Raphael Yuster},
journal= {arXiv preprint arXiv:1011.6181},
year = {2011}
}
Comments
revised to handle negative weights; faster algorithm for positive weights; added observation regarding the unweighted case