170 likes | 281 Views
All-Pairs Bottleneck Paths in Vertex Weighted graphs. Asaf Shapira Microsoft Research Raphael Yuster University of Haifa Uri Zwick Tel-Aviv University. Background. All Pairs Shortest Paths: Given a weighted directed graph,
E N D
All-Pairs Bottleneck Paths in Vertex Weighted graphs Asaf Shapira Microsoft Research Raphael Yuster University of Haifa Uri Zwick Tel-Aviv University
Background All Pairs Shortest Paths: Given a weighted directed graph, find for all pairs uv, the shortest path connecting u to v. [Seidel 95, Alon Galil Margalit 97, Zwick 98] :Subcubic (that is O(n3-)) algorithms for directed/undirected graphs, with small integer edge weights.
What is a Bottleneck 4 2 3 8 u v 3 8 2 4 1 6 u v 6 9 Bottleneck of a path= heaviest vertex on path (inc. endpoints). Bottleneck between u and v= minimum bottleneck of all paths connecting u and v. b(u,v) = Bottleneck from u to v.
Previous Results [Polack 60]: O(n3) algorithm for all pairs bottleneck paths in edge weighted directed graphs. [Hu 61]: O(n2) algorithm for all pairs bottleneck paths in edge weighted undirected graphs. [Dijkstra 59 + Fredman-Tarjan 87]: O(m+n log n) algorithm for single source bottleneck paths in edge weighted directed graphs.
Main Results Theorem:Given a vertex weighted directed graph G=(V,E) it is possible to compute b(u,v) for all pairs u,v in time O(n2.575). d(u,v) = length of shortest path from u to v. db(u,v) = minimum bottleneck over all paths of length d(u,v). Theorem:Given a vertex weighted graph G=(V,E) it is possible to compute db(u,v) for all pairs u,v in time O(n2.86).
Bollean Matrix Multiplication [Coppersmith-Winograd 90]:The boolean product of two n by n matrices can be computed using n algebraic operations (additions, subtractions, multiplications), where < 2.376. Wittnesses for boolean matrix multiplication: a matrix W st: • If cij=1 then Wij = k for somek st aik=bkj=1. • If cij=0 then Wij = 0. [Alon-Naor 92, Galil Margalit 92]: The witness matrix W can be computed in time O(n+o(1)).
Min Witnesses for Bool Mat Multip Wittnesses for boolean matrix multiplication: a matrix W st: • If cij=1 then Wij = k for somek st aik=bkj=1. • If cij=0 then Wij = 0. Minimum wittnesses for boolean matrix multip: a matrix W st: • If cij=1 then Wij = k for the smallestk st aik=bkj=1. • If cij=0 then Wij = 0. [Czumaj, Kowaluk, Lingas 06]: The minimum witnesses matrix can be computed in time O(n2.575).
Additional Results Theorem:Computing All-Pairs Bottleneck paths is (up to constant factors) equivalent to finding minimum witnesses. Definition:An LCA (lowest common ancestor) of vertices u, v in a DAG is a vertex w that a has a path to u and a path to v, such that no other vertex reachable from w has a path to u, and a path to v. Proposition:Computing All Pairs LCAs in a DAG is not harder than computing All-Pairs Bottleneck Paths.
Finding Short Bottlenecks 3 8 6 2 4 u v Bottleneck of a path= heaviest vertex on the path. Pt(u,v) = 1if and only if there is a path from u to v, of length at most t, such that v has maximum weight. Patch together two paths that meet at the bottleneck Qt(u,v) = 1if and only if there is a path from u to v, of length at most t, such that u has maximum weight. How can we compute bottlenecks of paths of length k ? bk(u,v) = Min (Min-Witness(Pr·Qk-r))u,v 0 ≤ r ≤ k
Finding Short Bottlenecks Lemma:Bottlenecks of length O(1) are computable in O(n2.575). bk(u,v) = Min (Min-Witness(Pk·Qk-r))u,v 0 ≤ r ≤ k Pt(u,v) = 1if and only if there is a path from u to v, of length at most t, such that v has maximum weight. We need to compute Pt in O(n2.575) ? A: adjacency matrix of G with 1’s on diagonal. B: Bij=1 iff w(u) ≤ w(v). Pt = (A · Pt-1) B
The General Case B = n/2 heaviest vertices A = n/2 lightest vertices 1 8 n 2 Solve recursively the problem on A T(n/2)
The General Case A = n/2 lightest vertices B = n/2 heaviest vertices 8 9 Reachability + Solve recursively on B: T(n/2)+O(n)
The General Case A = n/2 lightest vertices 4 9 1 5 Solve short bottlenecks: O(n2.575) Bottleneck
Running Time Running time is give by T(n) = 2T(n/2) + O(n2.575) = O(n2.575) In fact: Algorithms shows that finding bottlenecks is as easy finding minimum witnesses. We also prove the converse. Implies O(n2.575) algorithm for finding maximum vertex weighted triangle. First proved by [Vassilevska Williams Yuster 06]. Improved by [Czumaj Lingas 06].
Finding Short Bottleneck Paths d(u,v) = length of shortest path from u to v. db(u,v) = minimum bottleneck over all paths of length d(u,v). Theorem:Given a vertex weighted graph G=(V,E) it is possible to compute db(u,v) for all pairs u,v in time O(n2.86). Main Idea:Handle the case of short paths using previous alg. Handle long paths using “bridging sets”: select a small set of vertices B, and solve the single-source problem for all v B. whp, we hit all the “long” shortest-paths.
Concluding Remarks 1) [Vassilevska Williams uster 06]:O(n2.792) algorithm for bottlenecks paths in edge weighted graphs. • Find an O(nw) algorithm for min-witnesses of boollean matrix-multiplication. • Resolve complexity of Least Common Ancestors in DAGs: Is LCA in DAGs as hard as min-witnesses for boolean matrix multiplication? Is LCA in DAGs as easy as boolean matrix multiplication?