{"title":"All pairs shortest paths in weighted directed graphs-exact and almost exact algorithms","authors":"Uri Zwick","doi":"10.1109/SFCS.1998.743464","DOIUrl":null,"url":null,"abstract":"We present two new algorithms for solving the All Pairs Shortest Paths (APSP) problem for weighted directed graphs. Both algorithms use fast matrix multiplication algorithms. The first algorithm solves the APSP problem for weighted directed graphs in which the edge weights are integers of small absolute value in O/spl tilde/(n/sup 2+/spl mu//) time, where /spl mu/ satisfies the equation /spl omega/(1,/spl mu/,1)=1+2/spl mu/ and /spl omega/(1,/spl mu/,1) is the exponent of the multiplication of an n/spl times/n/sup /spl mu// matrix by an n/sup /spl mu///spl times/n matrix. The currently best available bounds on /spl omega/(1,/spl mu/,1), obtained by Coppersmith and Winograd, and by Huang and Pan, imply that /spl mu/<0.575. The running time of our algorithm is therefore O(n/sup 2.575/). Our algorithm improves on the O/spl tilde/(n/sup (3+/spl omega/)/2/) time algorithm, where /spl omega/=/spl omega/(1,1,1)<2.376 is the usual exponent of matrix multiplication, obtained by Alon, Galil and Margalit, whose running time is only known to be O(n/sup 2.688/). The second algorithm solves the APSP problem almost exactly for directed graphs with arbitrary non-negative real weights. The algorithm runs in O/spl tilde/((n/sup /spl omega////spl epsiv/)/spl middot/log(W//spl epsiv/)) time, where /spl epsiv/>0 is an error parameter and W is the largest edge weight in the graph, after the edge weights are scaled so that the smallest non-zero edge weight in the graph is 1. It returns estimates of all the distances in the graph with a stretch of at most 1+/spl epsiv/. Corresponding paths can also be found efficiently.","PeriodicalId":228145,"journal":{"name":"Proceedings 39th Annual Symposium on Foundations of Computer Science (Cat. No.98CB36280)","volume":"29 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1998-11-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"98","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings 39th Annual Symposium on Foundations of Computer Science (Cat. No.98CB36280)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/SFCS.1998.743464","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 98
Abstract
We present two new algorithms for solving the All Pairs Shortest Paths (APSP) problem for weighted directed graphs. Both algorithms use fast matrix multiplication algorithms. The first algorithm solves the APSP problem for weighted directed graphs in which the edge weights are integers of small absolute value in O/spl tilde/(n/sup 2+/spl mu//) time, where /spl mu/ satisfies the equation /spl omega/(1,/spl mu/,1)=1+2/spl mu/ and /spl omega/(1,/spl mu/,1) is the exponent of the multiplication of an n/spl times/n/sup /spl mu// matrix by an n/sup /spl mu///spl times/n matrix. The currently best available bounds on /spl omega/(1,/spl mu/,1), obtained by Coppersmith and Winograd, and by Huang and Pan, imply that /spl mu/<0.575. The running time of our algorithm is therefore O(n/sup 2.575/). Our algorithm improves on the O/spl tilde/(n/sup (3+/spl omega/)/2/) time algorithm, where /spl omega/=/spl omega/(1,1,1)<2.376 is the usual exponent of matrix multiplication, obtained by Alon, Galil and Margalit, whose running time is only known to be O(n/sup 2.688/). The second algorithm solves the APSP problem almost exactly for directed graphs with arbitrary non-negative real weights. The algorithm runs in O/spl tilde/((n/sup /spl omega////spl epsiv/)/spl middot/log(W//spl epsiv/)) time, where /spl epsiv/>0 is an error parameter and W is the largest edge weight in the graph, after the edge weights are scaled so that the smallest non-zero edge weight in the graph is 1. It returns estimates of all the distances in the graph with a stretch of at most 1+/spl epsiv/. Corresponding paths can also be found efficiently.