Download presentation
Presentation is loading. Please wait.
1
1 Approximate Distance Oracles Mikkel Thorup AT&T Research Uri Zwick Tel Aviv University
2
2 Finite metric space n by n distance matrix O(1) query time Exact answers (n 2 ) space Approximate distance oracle Compact data structure O(k) query time stretch 2k - 1 O(kn 1+1/k ) space O(n 2 ) time
3
3 Graph n by n distance matrix Compact data structure APSP algorithm kmn 1/k time kn 1+1/k space
4
4 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 k 2k-1 Constant query time! This tradeoff is essentially optimal !
5
5 Approximate Distance Oracles Preproc. time Space Query time Stretch Ω(n 2 )2.99 mn 1/2 O(n 3/2 )13 Ω(n 3/2 )4.99 mn 1/3 O(n 4/3 )15 ………… m log nn log nlog n
6
6 Stretch/space tradeoff Let G=(V,E) be a graph with |V|=n and girth(G)≥2k+2. Any subgraph G’=(V,E’) of G must have a distinct data structure! If (u,v) E’, then G’ (u,v)=1. Otherwise G’ (u,v) ≥2k+1. As there are 2 |E| different subgraphs of G, some subgraphs must have data structures of at least |E| bits. Conjecture: (Erdös ’65) For every k≥1, there are infinitely many n-vertex graphs with Ω(n 1+1/k ) edges that have girth≥2k+2.
7
7 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
8
8 Trivial example
9
9 Theorem For every k≥1, every weighted undirected graph on n vertices has a (2k-1)-spanner with at most m 2k+1 (n) ≤ n 1+1/k edges. Maximal number of edges in an n-vertex graph with girth ≥ 2k+1 Tight for k=1,2,3,5. Conjectured to be tight for any k
10
10 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 m 2k+1 (n) ≤ n 1+1/k. [Althöfer, Das, Dobkin, Joseph, Soares ‘93]
11
11 If |cycle| 2k, then red edge can be removed.
12
12 A hierarchy of centers A 0 V ; A k ; A i sample(A i-1,n -1/k ) ;
13
13 Clusters A0=A1=A2=A0=A1=A2= w
14
14 Bunches (inverse clusters)
15
15 Bunches A0=A1=A2=A0=A1=A2= v p 1 (v) p 2 (v)
16
16 The data structure For every vertex v V: The centers p 1 (v), p 2 (v),…, p k-1 (v) A hash table holding B(v) For every w V, we can check, in constant time, whether w B(v), and if so, what is (v,w).
17
17 Lemma: E[|B(v)|]≤kn 1/k Proof: |B(v) A i | is stochastically dominated by a geometric random variable with parameter p=n -1/k.
18
18 Query answering algorithm Algorithm dist k (u,v) w u, i 0 while w B(v) { i i+1 (u,v) (v,u) w p i (u) } return (w,u)+ (w,v)
19
19 Query answering algorithm u v w 1 =p 1 (v) A 1 w 2 =p 2 (u) A 2 w 3 =p 3 (v) A 3
20
20 u v w i-1 =p i-1 (v) A i-1 w i =p i (u) A i Analysis (i-1) ii ii (i+1)
21
21 Spanners / Tree covers w In each cluster, construct a tree of shortest paths The union of all these trees in a (2k-1)-spanner with kn 1+1/k edges. Constructed in O(kmn 1/k ) time!
22
22 Tree Cover Each vertex contained in at most n 1/k log n trees. For every u,v, there is a tree with a path of stretch at most 2k-1 between them.
23
23 Applications Routing Distance labels Sub-quadratic approximation algorithms for metric space problems
24
24 Open Problems 1.Deterministic construction of (2k-1,n 1+1/k,k)-distance oracles in o(mn) time? 2.Constructing a (3,n 3/2,1)-distance oracle in n 2+o(1) time? 3.Distance oracles with additive errors?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.