Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "1 Exact and Approximate Distances in Graphs – A Survey Uri Zwick Tel Aviv University."— Presentation transcript:

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

2 2 Distances and Shortest Paths u v

3 3 Variations unweighted non-negative integer weights integer weights non-negative real weights real weights undirected directed exact results additive error multiplicative error given pair(s) single source all pairs Spanners Distance oracles deterministic randomized

4 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 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 nm n General real edge weights Goldberg ’95 (Gabow-Tarjan ’89) mn 1/2 log N Integer edge weights

6 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 7 Single-Source Shortest Paths directed graphs, nonnegative integer edge weights, randomized algorithms Thorup ’96 m loglog n Thorup ’96 m+(n log n)/w 1/2-  Raman ’97, Cherkassky-Goldberg- Silverstein ’97 m+nw 1/4+  Raman ’97 m+n(log n) 1/3+ 

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

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

10 10 Open Problems: SSSP 1.Directed SSSP with real edge weights in o(mn) time? 2.Directed SSSP with integer edge weights in o(mn 1/2 log N) time? 3.Directed SSSP with non-negative integer edge weights in linear time? 4.What is the complexity of the SSSP problem with non-negative weights in the addition-comparison model?

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

12 12 Min-Plus (Distance) Product

13 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 14 APSP and DP If D is an n by n matrix containing the edge weights of a graph, then D n 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(n 2 ) DP(n)  APSP(3n) Furman ’70, Munro ’71, Fischer-Meyer ’71

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

16 16 All-Pairs Shortest Paths undirected graphs, weights from {1,2,…,M} Galil-Margalit ’92 Alon-Naor ’92 Seidel ’92 Shoshan-Zwick ’99 Mn  < Mn 2.367  – exponent of fast matrix multiplication   Coppersmith-Winograd ’90]

17 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(A 2 ) X  CA, deg  Ae-1 d ij  2c ij – [x ij < c ij deg j ] return D endif

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

19 19 Rectangular Matrix Multiplication n n nn n n nn nn  - The largest constant such that these algebraic products can be computed using n 2+o(1) operations.  >0.294 Coppersmith ‘97

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

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

22 22 Open Problems: APSP 5.Are n 5/2 additions-comparisons needed? 6.An n 3-  time algorithm in the add-comp model, counting all operations? 7.An n 3-  logM time algorithm? 8.An n 5/2 time algorithm for unweighted directed graphs?

23 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 24 All-Pairs Almost Shortest Paths unweighted, undirected graphs ReferenceTime * Surplus Aingworth-Chekuri- Indyk-Motwani ’96 n 5/2 2 Dor-Halperin- Zwick ’96 n 3/2 m 1/2, n 7/3 2 “ n 5/3 m 1/3, n 11/5 4 “ kn 2-1/k m 1/k kn 2+1/(3k-4) 2(k-1)   Ignoring polylogarithmic factors

25 25 All-Pairs Almost Shortest Paths weighted undirected graphs ReferenceTime * Stretch Cohen-Zwick ‘97 n 3/2 m 1/2 2 “ n 7/3 7/3 “ n2n2 3

26 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|n 1+  ) time. (Elkin-Peleg ’01), Elkin ‘01

27 27 Open Problems: Approx. APSP 9.Improve the surplus/time tradeoff. Finite surplus in n 2+o(1) time? 10.Improve the stretch/time tradeoff. Stretch < 3 in n 2+o(1) time? 11.Further explore multiplicate/additive approximations.

28 28 Spanners 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 29 Example

30 30 Theorem For every k>1, every weighted undirected graph on n vertices has a (2k-1)-spanner with at most n 1+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 31 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 n 1+1/k. [Althöfer, Das, Dobkin, Joseph, Soares ‘93]

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

33 33 (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 34 ReferenceSize(a,b) Dor-Halperin- Zwick ’96 n 3/2 (1,2) Elkin-Peleg ‘01 n 1+  (1+ ,b(  )) (a,b)-Spanners

35 35 Open Problems: Spanners 12.Are there b 0, such that every unweighted undirected graph on n vertices has a (1,b)-spanner with n 3/2-  edges?

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

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

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

39 39 Open Problems: Distance Oracles 13.Deterministic construction of (2k-1,n 1+1/k,k)-distance oracles in o(mn) time? 14.Constructing a (3,n 3/2,1)-distance oracle in n 2+o(1) time? 15.Distance oracles with additive errors?

40 40 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


Download ppt "1 Exact and Approximate Distances in Graphs – A Survey Uri Zwick Tel Aviv University."

Similar presentations


Ads by Google