410 likes | 558 Views
Exact and Approximate Distances in Graphs – A Survey. Uri Zwick Tel Aviv University. v. u. Distances and Shortest Paths. Variations. undirected directed. unweighted non-negative integer weights integer weights non-negative real weights real weights. given pair(s) single source
E N D
Exact and Approximate Distances in Graphs – A Survey Uri Zwick Tel Aviv University
v u Distances and Shortest Paths
Variations undirected directed unweighted non-negative integer weights integer weights non-negative real weights real weights given pair(s) single source all pairs deterministic randomized exact results additive error multiplicative error Spanners Distance oracles
Models of Computation Integer weights: word RAM model Each weight is contained in a w-bit word. Allowed to perform additions, subtractions, comparisons, shifts, ANDs, ORs, XORs, and other bit operations. Real weights: addition-comparison model The only operations allowed on edge weights are additions (subtractions) and comparisons. We again assume random access capabilities.
SSSP, Priority queues and Sorting Time of Dijkstra =m*(decrease key) + n*(extract min). Monotonepriority queues are enough. Dijkstra’s algorithm sorts the distances. If n elements can be sorted in nf(n) time, then SSSP can be solved in mf(n) time. [Thorup ’96] For undirected graphs, the sorting bottleneck can be avoided! [Thorup ’97]
Single-Source Shortest Pathsdirectedgraphs, nonnegative integer edge weights, randomized algorithms
Single-Source Shortest Pathsundirected graphs, nonnegative integer edge weights, deterministic algorithm
Single-Source Shortest Pathsdeterministic algorithms nonnegative integer weights positive real weights R – ratio between largest and smallest edge weights
Open Problems: SSSP Directed SSSP with real edge weights in o(mn) time? Directed SSSP with integer edge weights in o(mn1/2log N) time? Directed SSSP with non-negative integer edge weights in linear time? What is the complexity of the SSSP problem with non-negative weights in theaddition-comparison model?
Algebraic Product The algebraic product of two n by n matrices over a ring can be computed using n algebraic operations (additions, subtractions, multiplications), where <2.376. Strassen ’69, … , Coppersmith-Winograd ’90
APSP and DP If D is an n by n matrix containing the edge weightsof a graph, then Dn is the distance matrix. APSP(n) DP(n) log n APSP(n) 6(DP(n/2) + 2DP(n/4) + 4DP(n/8) + …) + O(n2) DP(n) APSP(3n) Furman ’70, Munro ’71, Fischer-Meyer ’71
All-Pairs Shortest Pathsundirected graphs, weights from {1,2,…,M} – exponent of fast matrix multiplication < 2.376[Coppersmith-Winograd ’90]
Seidel’s Algorithmunweighted undirected graphsrunning time: nlogn • Algorithm Seidel(A) • if A=J then • return J-I • else • C Seidel(A2) • X CA , deg Ae-1 • dij 2cij – [xij < cijdegj] • return D • endif
All-Pairs Shortest Pathsdirected graphs, weights from {-M,…,0,…,M} (Galil-Margalit ’91) Zwick ‘98
Rectangular Matrix Multiplication n n - The largest constant such that these algebraic products can be computed using n2+o(1) operations. n n n >0.294 n n Coppersmith ‘97
Sampled Distance Products n n • F D • for i 1 to log3/2n do • { • s (3/2)i • B rand(V,(10nlnn)/s) • F min{ F , F[V,B]*F[B,V] } • } n |B|
All-Pairs Shortest Pathsdirected graphs, weights from [1,W](1+)-approximatedistances and paths
Open Problems: APSP Are n5/2additions-comparisons needed? An n3-time algorithm in the add-comp model, counting all operations? An n3-logM time algorithm? An n5/2time algorithm for unweighted directed graphs?
An estimated distance ’(u,v)is of stretcht iff (u,v) ’(u,v) t (u,v) An estimated distance ’(u,v)is of surplust iff (u,v) ’(u,v) (u,v) + t
All-Pairs Almost Shortest Pathsunweighted, undirected graphs *Ignoring polylogarithmic factors
Multiplicative/Additive Approximations For every >0, there is b=b(), such that an estimated distance ’(u,v)satisfying (u,v) ’(u,v) (1+)(u,v) + b() , for every uS and vV, can be computed in O(mn+|S|n1+) time. (Elkin-Peleg ’01) , Elkin ‘01
Open Problems: Approx.APSP Improve the surplus/time tradeoff. Finite surplus in n2+o(1) time? Improve the stretch/time tradeoff.Stretch < 3 in n2+o(1)time? Further explore multiplicate/additive approximations.
Spanners Let G be a weighted undirected graph. A subgraph H of G is a t-spanner of G iff u,vG, H(u,v) tG(u,v) . Awerbuch ’85 Peleg-Schäffer ‘89
Theorem For every k>1, every weighted undirected graph on n vertices has a (2k-1)-spanner with at most n1+1/k edges. Tight for k=1,2,3,5. Conjectured to be tight for any k – equivalent to a girth conjecture of Erdös.
Proof/Algorithm: Consider the edges in non-decreasing order of weight. Add each edge to the spanner if it does not close a cycle of size at most 2k. The resulting graph is a (2k-1)-spanner and it does not contain a cycle of size at most 2k. Hence the number of edges is at most n1+1/k. [Althöfer, Das, Dobkin, Joseph, Soares ‘93]
(a,b)-Spanners Let G be an unweighted undirected graph. A subgraph H of G is an (a,b)-spanner of Giff u,vG, H(u,v) aG(u,v) + b . (Dor-Halperin-Zwick ’96, a=1) Peleg-Elkin ‘01
Open Problems: Spanners Are there b<, and >0, such that every unweighted undirected graph on n vertices has a (1,b)-spanner with n3/2- edges?
All-Pairs Shortest Paths n by ndistancematrix Input graph APSPalgorithm The output matrix may be much larger than the input graph !!!
(Approximate) Distance Oracles Preprocessingalgorithm Input graph Compactdata structure Query answeringalgorithm ’(u,v) (u,v)
Open Problems: Distance Oracles Deterministic construction of(2k-1,n1+1/k,k)-distance oracles in o(mn) time? Constructing a (3,n3/2,1)-distance oracle in n2+o(1) time? Distance oracles withadditive errors?
A Slightly updated version of the survey can be found at http://www.cs.tau.ac.il/~zwick/papers/dist-survey-esa.ps.gz Please send suggestions/corrections/comments to zwick@tau.ac.il