Presentation is loading. Please wait.

Presentation is loading. Please wait.

Exact and Approximate Distances in Graphs – A Survey

Similar presentations


Presentation on theme: "Exact and Approximate Distances in Graphs – A Survey"— Presentation transcript:

1 Exact and Approximate Distances in Graphs – A Survey
Uri Zwick Tel Aviv University

2 Distances and Shortest Paths
u v

3 non-negative integer weights non-negative real weights
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

4 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.

5 Single-Source Shortest Paths “Classical” results
BFS m+n Unweighted graphs Dijkstra ’59 Fredman-Tarjan ’87 m+n log n Nonnegative real edge weights Bellman ‘58 Ford ‘62 m n General real edge weights Goldberg ’95 (Gabow-Tarjan ’89) mn1/2log N Integer edge weights

6 SSSP, Priority queues and Sorting
Time of Dijkstra = m*(decrease key) + n*(extract min). Monotone priority 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]

7 Raman ’97, Cherkassky-Goldberg-Silverstein ’97
Single-Source Shortest Paths directed graphs, nonnegative integer edge weights, randomized algorithms Thorup ’96 m loglog n m+(n log n)/w1/2- Raman ’97, Cherkassky-Goldberg-Silverstein ’97 m+nw1/4+ Raman ’97 m+n(log n)1/3+

8 Single-Source Shortest Paths undirected graphs, nonnegative integer edge weights, deterministic algorithm Thorup ’97 m+n

9 Single-Source Shortest Paths deterministic algorithms
nonnegative integer weights Hagerup ’00 m log w directed positive real weights Pettie- Ramachandran ’01 m(m,n)+n loglog R undirected m+n log R directed R – ratio between largest and smallest edge weights

10 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 the addition-comparison model?

11 All-Pairs Shortest Paths
Reference Complexity Weights Directed? Johnson ‘77 mn+n2 log n real Yes Kar-Kol-Phi ’93 McGeoch ‘95 m*n+n2 log n real+ Hagerup ’00 mn+n2 loglog n integer Thorup ’97 mn No Pettie-Rama. ’01 mn(m,n)

12 Min-Plus (Distance) Product

13 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

14 APSP(n)  6 ( DP(n/2) + 2 DP(n/4) + 4 DP(n/8) + …) + O(n2)
APSP and DP If D is an n by n matrix containing the edge weights of a graph, then Dn is the distance matrix. APSP(n)  DP(n) log n APSP(n)  6 ( DP(n/2) + 2 DP(n/4) + 4 DP(n/8) + …) + O(n2) DP(n)  APSP(3n) Furman ’70, Munro ’71, Fischer-Meyer ’71

15 All-Pairs Shortest Paths directed graphs, real weights
Floyd ’62 Warshall ’62 n3 Fredman ‘76 *** n5/2 *** Fredman ’76 Takaoka ’92 n3(loglog n/log n)1/2

16 All-Pairs Shortest Paths undirected graphs, weights from {1,2,…,M}
Galil-Margalit ’92 Alon-Naor ’92 Seidel ’92 Shoshan-Zwick ’99 Mn < Mn2.367  – exponent of fast matrix multiplication  < [Coppersmith-Winograd ’90]

17 Seidel’s Algorithm unweighted undirected graphs running time: n log n
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

18 All-Pairs Shortest Paths directed graphs, weights from {-M,…,0,…,M}
(Galil-Margalit ’91) Zwick ‘98

19 Rectangular Matrix Multiplication
 - 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

20 Sampled Distance Products
F  D for i 1 to log3/2n do { s  (3/2)i B  rand(V,(10n ln n)/s) F  min{ F , F[V,B]*F[B,V] } } n |B|

21 All-Pairs Shortest Paths directed graphs, weights from [1,W] (1+)-approximate distances and paths
Zwick ’98 (n/) log(W/)

22 Open Problems: APSP Are n5/2 additions-comparisons needed?
An n3- time algorithm in the add-comp model, counting all operations? An n3-logM time algorithm? An n5/2 time algorithm for unweighted directed graphs?

23 An estimated distance ’(u,v) is of stretch t iff (u,v)  ’(u,v)  t (u,v)
An estimated distance ’(u,v) is of surplus t iff (u,v)  ’(u,v)  (u,v) + t

24 All-Pairs Almost Shortest Paths unweighted, undirected graphs
Reference Time* Surplus Aingworth-Chekuri- Indyk-Motwani ’96 n5/2 2 Dor-Halperin- Zwick ’96 n3/2m1/2 , n7/3 n5/3m1/3 , n11/5 4 kn2-1/km1/k kn2+1/(3k-4) 2(k-1) * Ignoring polylogarithmic factors

25 All-Pairs Almost Shortest Paths weighted undirected graphs
Reference Time* Stretch Cohen-Zwick ‘97 n3/2m1/2 2 n7/3 7/3 n2 3

26 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 uS and vV, can be computed in O(mn+|S|n1+) time. (Elkin-Peleg ’01) , Elkin ‘01

27 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.

28 Spanners H(u,v)  t G(u,v) . Let G be a weighted undirected graph.
A subgraph H of G is a t-spanner of G iff u,vG, H(u,v)  t G(u,v) . Awerbuch ’85 Peleg-Schäffer ‘89

29 Example

30 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.

31 [Althöfer, Das, Dobkin, Joseph, Soares ‘93]
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]

32 If |cycle|2k, then red edge can be removed.

33 (Dor-Halperin-Zwick ’96, a=1)
(a,b)-Spanners Let G be an unweighted undirected graph. A subgraph H of G is an (a,b)-spanner of G iff u,vG, H(u,v)  a G(u,v) + b . (Dor-Halperin-Zwick ’96, a=1) Peleg-Elkin ‘01

34 (a,b)-Spanners n3/2 n1+ Reference Size (a,b) (1,2) (1+,b())
Dor-Halperin-Zwick ’96 n3/2 (1,2) Elkin-Peleg ‘01 n1+ (1+,b())

35 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?

36 All-Pairs Shortest Paths
n by n distance matrix Input graph APSP algorithm The output matrix may be much larger than the input graph !!!

37 (Approximate) Distance Oracles
Preprocessing algorithm Input graph Compact data structure Query answering algorithm (u,v) ’(u,v)

38 Approximate Distance Oracles
Reference Preproc. time Space Query time Stretch Awerbuch-Berger-Cowen-Peleg ‘93 kmn1/k kn1+1/k kn1/k 64k Cohen ‘93 2k+ Thorup- Zwick ‘01 k 2k-1

39 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 with additive errors?

40 A Slightly updated version of the survey can be found at
Please send suggestions/corrections/comments to


Download ppt "Exact and Approximate Distances in Graphs – A Survey"

Similar presentations


Ads by Google