Title: A randomized linear time algorithm for graph spanners
1A randomized linear time algorithm forgraph
spanners
- Surender Baswana
- Postdoctoral Researcher
- Max Planck Institute for Computer Science
- Saarbruecken, Germany
2Graph Spanners
- Definition
- Given a graph G(V,E), a spanner is a sub-graph
G(V,Es) which has the following two crucial
properties -
-
3Graph Spanners
- Definition
- Given a graph G(V,E), a spanner is a sub-graph
G(V,Es) which has the following two crucial
properties - sparse
-
4Graph Spanners
- Definition
- Given a graph G(V,E), a spanner is a sub-graph
G(V,Es) which has the following two crucial
properties - sparse
- preserves approximate distances pair-wise.
5Graph Spanners
- Definition
- Given a graph G(V,E), a spanner is a sub-graph
G(V,Es) which has the following two crucial
properties - sparse
- preserves approximate distances pair-wise.
- d(u,v) ds(u,v) t d(u,v) for some
constant t 1
6Graph Spanners
- Definition
- Given a graph G(V,E), a spanner is a sub-graph
G(V,Es) which has the following two crucial
properties - sparse
- preserves approximate distances pair-wise.
- d(u,v) ds(u,v) t d(u,v) for some
constant t 1
t stretch of the spanner
7Communication network Motivation for spanners
8Communication network Motivation for spanners
- Each edge has
- cost
- weight (length)
9Communication network Motivation for spanners
- Minimizing the total cost sparseness is
desirable
10Communication network Motivation for spanners
- Minimizing the total cost sparseness is
desirable
u
v
11Communication network Motivation for spanners
- Minimizing the pair-wise distances small
stretch is desirable
12Communication network Motivation for spanners
- Minimizing the pair-wise distances small
stretch is desirable
13Graph spanners
- A trade off between sparseness and stretch
14Graph spanners
- A trade off between sparseness and stretch
- Sparse
- d(u,v) ds(u,v) t d(u,v)
15Graph spanners
- A trade off between sparseness and stretch
- Sparse
- d(u,v) ds(u,v) t d(u,v)
- t-Spanner
16- Aim
- To compute the sparsest spanner of a weighted
graph with stretch t.
17Applications of Graph Spanner
- Distributed Computing
- Design of Synchronizers
- Compact routing tables
- Computational Biology
- Reconstruction of Phylogenetic trees
- All-pairs Approximate Shortest Paths
18Organization of the talk
- Optimal size of a t-spanner
-
- Earlier algorithms
- A algorithm
New
19Optimal size of a t-spanner
20Optimal size of a t-spanner
v
u
21Optimal size of a t-spanner
v
u
22Optimal size of a t-spanner
v
u
???
Length of Smallest cycle t
23Optimal size of a t-spanner
v
u
stretch t-1
Length of Smallest cycle t
24Optimal size of a t-spanner
v
u
stretch t-1
Length of Smallest cycle t
How dense can a graph with shortest cycle length
t be ?
25Optimal size of a t-spanner
v
u
stretch t-1
Length of Smallest cycle t
Girth Conjecture Erdös1960, Bondy
Simonovits 1974, Bollobas 1978
There are graph with shortest cycle length gt 2k
and O(n11/k) edges
26Optimal size of a t-spanner
- Let k be any positive integer
- There are graphs whose (2k-1)-spanner (a
2k-spanner) must have O(n11/k) edges
27Optimal size of a t-spanner
- Let k be any positive integer
- There are graphs whose (2k-1)-spanner (a
2k-spanner) must have O(n11/k) edges
4- spanner and 3-spanner O(n3/2) 6-spanner and
5-spanner O(n5/4) 8-spanner and 7-spanner
O(n7/6)
28Aim of an Algorithmist
- To design an algorithm A such that
A
G(V, Es)
G(V, E)
(2k-1)-Spanner
Input Graph
ES O (minimum (m , n11/k))
29Earlier algorithms for (2k-1)-spanner
30Earlier algorithms for graph spanners
31Can we Compute (2k-1)-spanners in linear time ?
32A algorithm Computing a (2k-1)-spanner
in expected O(m) time
New
33Local approach
- Let G(V,ES) be a spanner of G(V,E)
Edge in Spanner
Edge not in Spanner
34Local approach
- Let G(V,ES) be a spanner of G(V,E)
Edge in Spanner
Edge not in Spanner
35Local approach
- Let G(V,ES) be a spanner of G(V,E)
Edge in Spanner
2
Edge not in Spanner
w
w
1
t-1
w
w
w
- Pt For each edge not in the spanner , there is
a path in the spanner - connecting its endpoints
- with at-most t edges
- none heavier than the edge
36Local approach
- Let G(V,ES) be a spanner of G(V,E)
Edge in Spanner
2
Edge not in Spanner
w
w
1
t-1
w
w
w
u
v
- Pt For each edge not in the spanner , there is
a path in the spanner - connecting its endpoints
- with at-most t edges
- none heavier than the edge
37Local approach
- Let G(V,ES) be a spanner of G(V,E)
Edge in Spanner
2
Edge not in Spanner
w
w
1
t-1
t-spanner
w
w
w
u
v
- Pt For each edge not in the spanner , there is
a path in the spanner - connecting its endpoints
- with at-most t edges
- none heavier than the edge
38New Algorithms for (2k-1)-spanner
- An External-memory algorithm for (2k-1)-spanner
- Time complexity Integer sorting
39New Algorithms for (2k-1)-spanner
- A distributed algorithm for (2k-1)-spanner
-
- Number of Rounds O(1) ,
- Communication complexity O(m) (linear)
40New Algorithms for (2k-1)-spanner
- A streaming algorithm for (2k-1)-spanner
- Number of passes O(1)
- Processing time per edge O(1)
41Algorithm for 3-spanner
42Algorithm for 3-spannerEasy case fewer than n½
edges
43Algorithm for 3-spannerDifficult case much
more than n½ edges
44Algorithm for 3-spannerDifficult case much
more than n½ edges
Which n½ edges to select ?
45Algorithm for 3-spanner
Initially all edges are Red
- Phase 1 Clustering
- Phase 2 Adding edges between vertices and
clusters
46Algorithm for 3-spanner
Initially all edges are Red
- Phase 1 Clustering
- Phase 2 Adding edges between vertices and
clusters
center
47Algorithm for 3-spannerPhase 1 Clustering
- S select each vertex independently with
probability p.
48Algorithm for 3-spannerPhase 1 Clustering
- S select each vertex independently with
probability p. - Process each v ? V \S as follows
49Algorithm for 3-spannerPhase 1 Clustering
- S select each vertex independently with
probability p. - Process each v ? V \S as follows
- If v is not adjacent to any sampled vertex
50Algorithm for 3-spannerPhase 1 Clustering
- S select each vertex independently with
probability p . - Process each v ? V \S as follows
- If v is not adjacent to any sampled vertex.
v
S
V \S
51Algorithm for 3-spannerPhase 1 Clustering
- S select each vertex independently with
probability p . - Process each v ? V \S as follows
- If v is not adjacent to any sampled vertex. add
all its edges.
v
S
V \S
52Algorithm for 3-spannerPhase 1 Clustering
- S select each vertex independently with
probability p. - Process each v ? V \S as follows
- If v is not adjacent to any sampled vertex. add
all its edges. - If v is adjacent to some sampled vertex
S
V \S
53Algorithm for 3-spannerPhase 1 Clustering
- S select each vertex independently with
probability p . - Process each v ? V \S as follows
- If v is not adjacent to any sampled vertex. add
all its edges. - If v is adjacent to some sampled vertex.
v
S
V \S
x
weights
54Algorithm for 3-spannerPhase 1 Clustering
- S select each vertex independently with
probability p. - Process each v ? V \S as follows
- If v is not adjacent to any sampled vertex. add
all its edges. - If v is adjacent to some sampled vertex.
-
v
S
V \S
x
weights
55Algorithm for 3-spannerPhase 1 Clustering
- S select each vertex independently with
probability p - Process each v ? V \S as follows
- If v is not adjacent to any sampled vertex. add
all its edges. - If v is adjacent to some sampled vertex.
-
v
S
V \S
x
weights
56Algorithm for 3-spannerPhase 1 Clustering
- S select each vertex independently with
probability p - Process each v ? V \S as follows
- If v is not adjacent to any sampled vertex. add
all its edges. - If v is adjacent to some sampled vertex.
-
v
S
V \S
x
weights
57Algorithm for 3-spannerPhase 1 Clustering
Remaining Red edges
Red edges
58Algorithm for 3-spannerPhase 1 Clustering
- G(V,E) G(V1,E1)
- Every v ? V1 is clustered
Remaining Red edges
Red edges
v
o
59Algorithm for 3-spannerPhase 1 Clustering
- G(V,E) G(V1,E1)
- Every v ? V1 is clustered
- Every red edge (w-v) ? E1 is ......
Remaining Red edges
Red edges
v
o
60Algorithm for 3-spannerPhase 1 Clustering
- G(V,E) G(V1,E1)
- Every v ? V1 is clustered
- Every red edge (w-v) ? E1 is at-least as heavy as
(v-o)
Remaining Red edges
Red edges
v
o
61Algorithm for 3-spannerPhase 1 Clustering
- G(V,E) G(V1,E1)
- Every v ? V1 is clustered
- Every red edge (w-v) ? E1 is at-least as heavy as
(v-o)
Red edges
Remaining Red edges
v
o
Observation I
62Algorithm for 3-spannerDifficult case much
more than n½ edges
Which n½ edges to select ?
63Algorithm for 3-spannerDifficult case much
more than n½ edges
v
64Algorithm for 3-spannerPhase 2 adding edges
between vertices and clusters
v
65Analysis of the algorithm
- Size of the spanner
- Edges added during Phase 1 Edges added during
Phase 2 - n/p n2p
- n3/2 , for p 1/vn
- Correctness ??
66Spanner has stretch 3Property P3 holds
x
y
67Spanner has stretch 3Property P3 holds
x
y
Both x and y are clustered
68Spanner has stretch 3Property P3 holds
x
y
y
x
69Spanner has stretch 3Property P3 holds
x
y
y
x
Observation I
70Spanner has stretch 3Property P3 holds
x
y
o
y
x
y
x
71Spanner has stretch 3Property P3 holds
x
y
z
a
o
y
x
ß
y
x
72Spanner has stretch 3Property P3 holds
x
y
z
a
o
y
x
ß
y
x
Observation I
73Algorithm for (2k-1)-spanner
74Algorithm for (2k-1)-spanner
Vertices
Clusters
n1/k
n1-1/k
n
75Algorithm for (2k-1)-spanner
- Invariant At level i, we have graph G(Vi,Ei)
- Every vertex in Vi is clustered
- For every edge e ? Ei
e
76An open problem
Fully Dynamic algorithm for (2k-1)-spanner ?
77Thank you