Approximate Distance Oracles - PowerPoint PPT Presentation

About This Presentation
Title:

Approximate Distance Oracles

Description:

Distance Oracles - Construction Thorup and Zwick (2005) From each cluster, construct a tree T(w) containing shortest path. Distance Oracles ... – PowerPoint PPT presentation

Number of Views:119
Avg rating:3.0/5.0
Slides: 27
Provided by: shi5153
Category:

less

Transcript and Presenter's Notes

Title: Approximate Distance Oracles


1
Approximate Distance Oracles
Mikkel Thorup and Uri Zwick Presented By Shiri
Chechik
2
Approximate Distance Oracles
  • Consider a graph G(V,E).
  • An approximate distance oracle with a stretch k
    for the graph G is a data-structure that can
    answer an approximate distance query for any two
    vertices with a stretch of at most k.
  • For every u,v in V the data structure returns in
    short time an approximate distance d such
    that dG(u,v) ? d ? k dG(u,v) .

3
Approximate Distance Oracles
Reference Preproc. time Space Query time Stretch
Awerbuch-Berger-Cowen-Peleg 93 kmn1/k kn11/k kn1/k 64k
Cohen 93 kmn1/k kn11/k kn1/k 2k?
Thorup-Zwick 01 kmn1/k kn11/k k 2k-1
Constant query time!
This tradeoff isessentially optimal !
Slide from Uri Zwick
4
Spanners - Formal Definition
  • Consider a graph G(V,E) with positive edge
    weights.
  • A subgraph H is a k-spanner of G if for every u,v
    in V dH(u,v) ? kdG(u,v) .

5
Spanners - Example
v
6
Spanners - Equivalent Definition
  • A subgraph H is a k-spanner of G if for every
    edge (u,v) in E dH(u,v) ? k w(u,v) .

x
y
7
Spanners for General graphs
  • Theorem
  • One can efficiently find a (2k-1)-spanner with
    at most n11/k edges.

8
Spanners for General graphs
  • Girth Conjecture (Erdös and others)
  • There are n-vertex graphs with O(n11/k) edges
    that have girth gt 2k. Known for k1,2,3,5.

9
Spanners - Equivalent Definition
  • A subgraph H is a k-spanner of G if for every
    edge (u,v) in E

x
y
10
Greedy Algorithm
11
Greedy Algorithm - Properties
  • H is a k-spanner of G (trivial).
  • The girth of H is greater than k1.
  • Assume c is a cycle of size at most k1
  • Let e(u,v) be the last edge added to cycle c.
  • Let w(e) be the weight of edge e.
  • All other edges of cycle c are of weight less
    than w(e).
  • We found a path between u and v of length less
    than kw(e).
  • e was not supposed to be added to H.

12
Greedy Algorithm - Example
13
Lemma
  • Let G(V,E) be a graph with girth 2k1.
  • This is also conjectured to be the lower bound of
    the number of edges in a (2k-1)-spanner (Erdös
    65).

14
Theorem
  • One can efficiently find a (2k-1)-spanner with
    edges.

15
Distance Oracles - Construction Preprocessing
Phase
  • First build a hierarchy of centers, A0,, Ak
  • A0 ?V, Ak ??
  • Ai ?sample(Ai-1, n-1/k)

16
Distance Oracles - Construction Preprocessing
Phase
A0
A1
A2
Ak
17
A hierarchy of centers
A0?V Ak ?? Ai ?sample(Ai-1,n-1/k)
Slide from Uri Zwick
18
Distance Oracles - Construction Preprocessing
Phase
  • Notations
  • pi(v) is the closest node to v in Ai
  • For each w ? Ai\Ai1
  • C(w) ? v d(v,w) lt d(v,pi1(v))

19
Clusters
w
Slide from Uri Zwick
20
Bunches (inverse clusters)
Slide from Uri Zwick
21
Distance Oracles - Example
V
P1(V)
22
Distance Oracles - Example
  • A0 v1, v2, v3, v4
  • A1 v2, v3
  • A2 v3
  • A3
  • C(v1) v1, v4, C(v4) v4
  • C(v2) v2, v1
  • C(v3) v1, v2, v3, v4

V3
1
2
V2
V4
1
1.5
V1
23
Distance Oracles - Construction Preprocessing
Phase
  • Data structures
  • For every v ? V
  • p1(v),,pk-1(v) and the distance from v to pi(v).
  • C(v) (hash table) and the distance from v to
    every u in C(v).

24
Distance Oracles
  • Lemma EB(v)kn1/k
  • B(v)?Ai is stochastically dominated by a
    geometric random variable with parameter pn-1/k.

Slide from Uri Zwick
25
Distance Oracles
  • Lemma
  • For every two nodes u and v, there exists a node
    w such that
  • u,v ? C(w)
  • The distance from u to w and from v to w is at
    most kd(u,v)

26
Distance Oracles - Construction Query Phase
27
Distance Oracles - Construction Query Phase
P3(v)
P2(u)
lt3?
P1(v)
2?gt
lt?
v
?
u
28
Distance Oracles - Example
  • What is d(v4, v1)?
  • Is v1? C(v4)?
  • w p1 (v1) v2
  • Is v4? C(v2)?
  • w p2(v4) v3
  • Is v1? C(v3)? Yes
  • C(v1) v1, v4, C(v4) v4
  • C(v2) v2, v1
  • C(v3) v1, v2, v3, v4

V3
1
2
V2
V4
1
1.5
V1
29
Distance Oracles - Properties Thorup and Zwick
(2005)
  • Consider a node v ? C(w), every node on a
    shortest path from v to w also belongs to C(w).

x ? Ai1
v
w
y
30
Distance Oracles - Properties Thorup and Zwick
(2005)
  • v belongs to C(pi(v)) for every
  • 0 i k-1.

31
Distance Oracles - Construction Thorup and Zwick
(2005)
  • Short Summary
  • For every two nodes u and v, there exists a node
    w such that
  • u,v ? C(w)
  • The distance from u to w and from v to w is at
    most k?

32
Distance Oracles
  • From each cluster, construct a tree T(w)
    containing shortest path.

v
u
w
33
Distance Oracles
  • The union of all these trees is a (2k-1)-spanner
    with
  • O(kn11/k) edges.
Write a Comment
User Comments (0)
About PowerShow.com