TY - GEN

T1 - Answering distance queries in directed graphs using fast matrix multiplication

AU - Yuster, Raphael

AU - Zwick, Uri

PY - 2005

Y1 - 2005

N2 - Let G = (V, E, w) be a weighted directed graph, where w : E → {-M,..., 0,..., M}. We show that G can be preprocessed in Õ(Mn ω) time, where ω < 2.376 is the exponent of fast matrix multiplication, such that subsequently, each distance δ(u, v) in the graph, where u, v ∈ V, can be computed exactly in O(n) time. We also present a tradeoff between the processing time and the query answering time. As a very special case, we obtain an Õ(Mn ω) time algorithm for the Single Source Shortest Paths (SSSP) problem for directed graphs with integer weights of absolute value at most M. For sufficiently dense graphs, with small enough edge weights, this improves upon the O(m√n log M) time algorithm of Goldberg. We note that even the case M = 1, in which all the edge weights are in {-1, 0, +1}, is an interesting case for which no improvement over Goldberg's O(m√n) algorithm was known. Our new Õ(n ω) algorithm is faster whenever m > n ω-1/2 ≃ n 1.876.

AB - Let G = (V, E, w) be a weighted directed graph, where w : E → {-M,..., 0,..., M}. We show that G can be preprocessed in Õ(Mn ω) time, where ω < 2.376 is the exponent of fast matrix multiplication, such that subsequently, each distance δ(u, v) in the graph, where u, v ∈ V, can be computed exactly in O(n) time. We also present a tradeoff between the processing time and the query answering time. As a very special case, we obtain an Õ(Mn ω) time algorithm for the Single Source Shortest Paths (SSSP) problem for directed graphs with integer weights of absolute value at most M. For sufficiently dense graphs, with small enough edge weights, this improves upon the O(m√n log M) time algorithm of Goldberg. We note that even the case M = 1, in which all the edge weights are in {-1, 0, +1}, is an interesting case for which no improvement over Goldberg's O(m√n) algorithm was known. Our new Õ(n ω) algorithm is faster whenever m > n ω-1/2 ≃ n 1.876.

UR - http://www.scopus.com/inward/record.url?scp=33748051465&partnerID=8YFLogxK

U2 - 10.1109/SFCS.2005.20

DO - 10.1109/SFCS.2005.20

M3 - Conference contribution

AN - SCOPUS:33748051465

SN - 0769524680

SN - 9780769524689

T3 - Proceedings - Annual IEEE Symposium on Foundations of Computer Science, FOCS

SP - 389

EP - 396

BT - Proceedings - 46th Annual IEEE Symposium on Foundations of Computer Science, FOCS 2005

T2 - 46th Annual IEEE Symposium on Foundations of Computer Science, FOCS 2005

Y2 - 23 October 2005 through 25 October 2005

ER -