Improved Randomized Algorithms for Path Problems in Graphs

A randomized linear time algorithm for
graph spanners
Surender Baswana
Postdoctoral Researcher
Max Planck Institute for Computer Science
Saarbruecken, Germany
Graph Spanners
Definition :
Given a graph G=(V,E), a spanner is a sub-graph G=(V,Es)
which has the following two crucial properties
Graph Spanners
Definition :
Given a graph G=(V,E), a spanner is a sub-graph G=(V,Es)
which has the following two crucial properties
1.
sparse
Graph Spanners
Definition :
Given a graph G=(V,E), a spanner is a sub-graph G=(V,Es)
which has the following two crucial properties
1.
sparse
2.
preserves approximate distances pair-wise.
Graph Spanners
Definition :
Given a graph G=(V,E), a spanner is a sub-graph G=(V,Es)
which has the following two crucial properties
1.
sparse
2.
preserves approximate distances pair-wise.
δ(u,v) ≤ δs(u,v) ≤ t δ(u,v)
for some constant t ≥ 1
Graph Spanners
Definition :
Given a graph G=(V,E), a spanner is a sub-graph G=(V,Es)
which has the following two crucial properties
1.
sparse
2.
preserves approximate distances pair-wise.
δ(u,v) ≤ δs(u,v) ≤ t δ(u,v)
for some constant t ≥ 1
t : stretch of the spanner
Communication network :
Motivation for spanners
Communication network :
Motivation for spanners
Each edge has
• cost
• weight (length)
Communication network :
Motivation for spanners

Minimizing the total cost :
sparseness is desirable
Communication network :
Motivation for spanners

Minimizing the total cost :
sparseness is desirable
u
v
Communication network :
Motivation for spanners

Minimizing the pair-wise distances : small stretch is desirable
Communication network :
Motivation for spanners

Minimizing the pair-wise distances : small stretch is desirable
Graph spanners

A trade off between sparseness and stretch
Graph spanners

A trade off between sparseness and stretch

Sparse

δ(u,v) ≤ δs(u,v) ≤ t δ(u,v)
Graph spanners

A trade off between sparseness and stretch

Sparse

δ(u,v) ≤ δs(u,v) ≤ t δ(u,v)
t-Spanner
Aim :
To compute the sparsest spanner of a weighted graph
with stretch t.
Applications of Graph Spanner

Distributed Computing



Computational Biology


Design of Synchronizers
Compact routing tables
Reconstruction of Phylogenetic trees
All-pairs Approximate Shortest Paths
Organization of the talk

Optimal size of a t-spanner

Earlier algorithms

A
algorithm
Optimal size of a t-spanner
Optimal size of a t-spanner
u
v
Optimal size of a t-spanner
u
v
Optimal size of a t-spanner
u
Length of Smallest cycle= t
v
???
Optimal size of a t-spanner
u
Length of Smallest cycle= t
v
stretch ≥ t-1
Optimal size of a t-spanner
u
Length of Smallest cycle= t
v
stretch ≥ t-1
How dense can a graph with shortest cycle length ≥ t be ?
Optimal size of a t-spanner
v
u
Length of Smallest cycle= t
Girth Conjecture [Erdös[1960],
stretch ≥ t-1
Bondy & Simonovits [1974], Bollobas [1978]]
There are graph with shortest cycle length > 2k and Ω(n1+1/k) edges
Optimal size of a t-spanner
Let k be any positive integer
There are graphs whose (2k-1)-spanner (a 2k-spanner)
must have Ω(n1+1/k) edges
Optimal size of a t-spanner
Let k be any positive integer
There are graphs whose (2k-1)-spanner (a 2k-spanner)
must have Ω(n1+1/k) edges
4- spanner and 3-spanner : Ω(n3/2)
6-spanner and 5-spanner : Ω(n5/4)
8-spanner and 7-spanner : Ω(n7/6)
Aim of an Algorithmist

To design an algorithm A such that
G=(V, E)
Input Graph
G=(V, Es)
A
(2k-1)-Spanner
|ES| = O (minimum (m , n1+1/k))
Earlier algorithms for (2k-1)-spanner
Earlier algorithms for graph spanners
Stretch
Althofer, Das, DCG 1993
Dobkin,Joseph
, Soares
Cohen
SIAM J.
Computing
1998
Thorup, Zwick
JACM 2005
2k-1
Construction Size
Time
O(mn1+1/k) O(n1+1/k)
(2k-1)(1+ε)
O(mn1/k)
O(n1+1/k)
2k-1
O(mn1/k)
O(n1+1/k)
(randomized)
Stretch
Althofer, Das, DCG 1993
Dobkin,Joseph
, Soares
Cohen
SIAM J.
Computing
1998
Thorup, Zwick
JACM 2005
2k-1
Construction Size
Time
O(mn1+1/k) O(n1+1/k)
(2k-1)(1+ε)
O(mn1/k)
O(n1+1/k)
2k-1
O(mn1/k)
O(n1+1/k)
(randomized)
Can we Compute (2k-1)-spanners in linear time ?
A
algorithm
Computing a (2k-1)-spanner in expected O(m) time
Local approach
Let G=(V,ES) be a spanner of G=(V,E)
Edge in Spanner
Edge not in Spanner
Local approach
Let G=(V,ES) be a spanner of G=(V,E)
Edge in Spanner
Edge not in Spanner
Local approach
Let G=(V,ES) be a spanner of G=(V,E)
Edge in Spanner
2
Edge not in Spanner
≤w
1
≤w
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
Local approach
Let G=(V,ES) be a spanner of G=(V,E)
Edge in Spanner
2
Edge not in Spanner
≤w
1
u
≤w
t-1
≤w
≤w
w
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
Local approach
Let G=(V,ES) be a spanner of G=(V,E)
Edge in Spanner
2
Edge not in Spanner
≤w
t-spanner
1
u
≤w
t-1
≤w
≤w
w
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
New Algorithms for (2k-1)-spanner

An External-memory algorithm for (2k-1)-spanner
Time complexity : Integer sorting
New Algorithms for (2k-1)-spanner

A distributed algorithm for (2k-1)-spanner :
Number of Rounds : O(1) ,
Communication complexity : O(m) (linear)
New Algorithms for (2k-1)-spanner

A streaming algorithm for (2k-1)-spanner
Number of passes : O(1)
Processing time per edge : O(1)
Algorithm for 3-spanner
Algorithm for 3-spanner
Easy case : fewer than n½ edges
Algorithm for 3-spanner
Difficult case : much more than n½ edges
Algorithm for 3-spanner
Difficult case : much more than n½ edges
Which n½ edges
to select ?
Algorithm for 3-spanner
Initially all edges are Red

Phase 1 : Clustering

Phase 2 : Adding edges between vertices and clusters
Algorithm for 3-spanner

Phase 1 : Clustering
Initially all edges are Red
center

Phase 2 : Adding edges between vertices and clusters
Algorithm for 3-spanner
Phase 1 : Clustering
1.
S : select each vertex independently with probability p.
Algorithm for 3-spanner
Phase 1 : Clustering
1.
2.
S : select each vertex independently with probability p.
Process each v Є V \S as follows
Algorithm for 3-spanner
Phase 1 : Clustering
1.
2.
S : select each vertex independently with probability p.
Process each v Є V \S as follows
1.
If v is not adjacent to any sampled vertex
Algorithm for 3-spanner
Phase 1 : Clustering
1.
2.
S : select each vertex independently with probability p .
Process each v Є V \S as follows
1.
If v is not adjacent to any sampled vertex.
v
S
V \S
Algorithm for 3-spanner
Phase 1 : Clustering
1.
2.
S : select each vertex independently with probability p .
Process each v Є V \S as follows
1.
If v is not adjacent to any sampled vertex. add all its edges.
v
S
V \S
Algorithm for 3-spanner
Phase 1 : Clustering
1.
2.
S : select each vertex independently with probability p.
Process each v Є V \S as follows
1.
2.
If v is not adjacent to any sampled vertex. add all its edges.
If v is adjacent to some sampled vertex
S
V \S
Algorithm for 3-spanner
Phase 1 : Clustering
1.
2.
S : select each vertex independently with probability p .
Process each v Є V \S as follows
1.
2.
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
Algorithm for 3-spanner
Phase 1 : Clustering
1.
2.
S : select each vertex independently with probability p.
Process each v Є V \S as follows
1.
2.
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
Algorithm for 3-spanner
Phase 1 : Clustering
1.
2.
S : select each vertex independently with probability p
Process each v Є V \S as follows
1.
2.
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
Algorithm for 3-spanner
Phase 1 : Clustering
1.
2.
S : select each vertex independently with probability p
Process each v Є V \S as follows
1.
2.
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
Algorithm for 3-spanner
Phase 1 : Clustering
G=(V,E)
Phase 1
Red edges
G=(V1,E1)
Remaining
Red edges
Spanner (partial)
Algorithm for 3-spanner
Phase 1 : Clustering
G=(V,E)
G=(V1,E1)
Phase 1
Red edges
Remaining
Red edges
Spanner (partial)

Every v Є V1 is clustered
v
o
Algorithm for 3-spanner
Phase 1 : Clustering
G=(V,E)
G=(V1,E1)
Phase 1
Red edges
Remaining
Red edges
Spanner (partial)


Every v Є V1 is clustered
Every red edge (w-v) Є E1 is ......
v
o
Algorithm for 3-spanner
Phase 1 : Clustering
G=(V,E)
G=(V1,E1)
Phase 1
Red edges
Remaining
Red edges
Spanner (partial)


Every v Є V1 is clustered
Every red edge (w-v) Є E1 is at-least as heavy as (v-o)
v
o
Algorithm for 3-spanner
Phase 1 : Clustering
G=(V,E)
G=(V1,E1)
Phase 1
Red edges
Remaining
Red edges
Spanner (partial)


Every v Є V1 is clustered
Every red edge (w-v) Є E1 is at-least as heavy as (v-o)
Observation I
v
o
Algorithm for 3-spanner
Difficult case : much more than n½ edges
Which n½ edges
to select ?
Algorithm for 3-spanner
Difficult case : much more than n½ edges
v
Algorithm for 3-spanner
Phase 2 : adding edges between vertices and clusters
v
Analysis 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/√n
Correctness ??
Spanner has stretch 3
Property P3 holds
x
y
Spanner has stretch 3
Property P3 holds
x
y
Both x and y are
clustered
Spanner has stretch 3
Property P3 holds
x
x
y
y
Spanner has stretch 3
Property P3 holds
x
x
y
Observation I
y
Spanner has stretch 3
Property P3 holds
x
x
y
y
x
y
o
Spanner has stretch 3
Property P3 holds
x
y
z
α
x
y
x
ß
y
o
Spanner has stretch 3
Property P3 holds
x
y
z
α
x
x
y
Observation I
ß
y
o
Algorithm for (2k-1)-spanner
Algorithm for (2k-1)-spanner
#Vertices
Vk-1
#Clusters
n1/k
V1
n1-1/k
V0
n
Algorithm 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
i edges
An open problem
Fully Dynamic algorithm for (2k-1)-spanner ?
Thank you