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,E s ) which has the following two crucial properties
Graph Spanners Definition : Given a graph G=(V,E), a spanner is a sub-graph G=(V,E s ) 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,E s ) 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,E s ) 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,E s ) 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
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 Design of Synchronizers Compact routing tables Computational Biology 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
u v
u v
u v ???Length of Smallest cycle= t
Optimal size of a t-spanner u v stretch ≥ t-1Length of Smallest cycle= t
Optimal size of a t-spanner u v stretch ≥ t-1Length of Smallest cycle= t How dense can a graph with shortest cycle length ≥ t be ?
Optimal size of a t-spanner u v stretch ≥ t-1 Girth Conjecture [ Erdös[1960], Bondy & Simonovits [1974], Bollobas [1978] ] There are graph with shortest cycle length > 2k and Ω(n 1+1/k ) edges Length of Smallest cycle= t
Optimal size of a t-spanner Let k be any positive integer There are graphs whose (2k-1)-spanner (a 2k-spanner) must have Ω(n 1+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 Ω(n 1+1/k ) edges 4- spanner and 3-spanner : Ω(n 3/2 ) 6-spanner and 5-spanner : Ω(n 5/4 ) 8-spanner and 7-spanner : Ω(n 7/6 )
Aim of an Algorithmist A To design an algorithm A such that A G=(V, E) G=(V, E s ) |E S | = O (minimum (m, n 1+1/k )) Input Graph (2k-1)-Spanner
Earlier algorithms for (2k-1)-spanner
Earlier algorithms for graph spanners Althofer, Das, Dobkin,Joseph, Soares DCG 19932k-1 O(mn 1+1/k )O(n 1+1/k ) Cohen SIAM J. Computing 1998 (2k-1)(1+ε) O(mn 1/k )O(n 1+1/k ) Thorup, Zwick JACM 20052k-1 O(mn 1/k ) (randomized) O(n 1+1/k ) StretchConstruction Time Size
Althofer, Das, Dobkin,Joseph, Soares DCG 19932k-1 O(mn 1+1/k )O(n 1+1/k ) Cohen SIAM J. Computing 1998 (2k-1)(1+ε) O(mn 1/k )O(n 1+1/k ) Thorup, Zwick JACM 20052k-1 O(mn 1/k ) (randomized) O(n 1+1/k ) StretchConstruction Time Size Can we Compute (2k-1)-spanners in linear time ?
Computing a (2k-1)-spanner in expected O(m) time A algorithm Computing a (2k-1)-spanner in expected O(m) time
Local approach Let G=(V,E S ) be a spanner of G=(V,E) Edge in Spanner Edge not in Spanner
Local approach Let G=(V,E S ) be a spanner of G=(V,E) Edge in Spanner Edge not in Spanner
Local approach Let G=(V,E S ) be a spanner of G=(V,E) 2 1t-1 ≤w≤w ≤w≤w ≤w≤w ≤w≤w w P t : 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 Edge not in Spanner Edge in Spanner
Local approach Let G=(V,E S ) be a spanner of G=(V,E) uv 2 1t-1 ≤w≤w ≤w≤w ≤w≤w ≤w≤w w P t : 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 Edge not in Spanner Edge in Spanner
Local approach Let G=(V,E S ) be a spanner of G=(V,E) uv 2 1t-1 ≤w≤w ≤w≤w ≤w≤w ≤w≤w w P t : 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 Edge not in Spanner Edge in Spanner t-spanner
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 edges Algorithm for 3-spanner Easy case : fewer than n ½ edges
Algorithm for 3-spanner Difficult case : much more than edges Algorithm for 3-spanner Difficult case : much more than n ½ edges
Which n ½ edges to select ?
Algorithm for 3-spanner Phase 1 : Clustering Phase 2 : Adding edges between vertices and clusters Initially all edges are Red
Algorithm for 3-spanner Phase 1 : Clustering Phase 2 : Adding edges between vertices and clusters center Initially all edges are Red
Algorithm for 3-spanner Phase 1 : Clustering 1. S : select each vertex independently with probability p.
Algorithm for 3-spanner Phase 1 : Clustering 1. S : select each vertex independently with probability p. 2. Process each v Є V \S as follows
Algorithm for 3-spanner Phase 1 : Clustering 1. S : select each vertex independently with probability p. 2. 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. S : select each vertex independently with probability p. 2. 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. S : select each vertex independently with probability p. 2. 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. S : select each vertex independently with probability p. 2. Process each v Є V \S as follows 1. If v is not adjacent to any sampled vertex. add all its edges. 2. If v is adjacent to some sampled vertex S V \S
Algorithm for 3-spanner Phase 1 : Clustering 1. S : select each vertex independently with probability p. 2. Process each v Є V \S as follows 1. If v is not adjacent to any sampled vertex. add all its edges. 2. If v is adjacent to some sampled vertex. weights v x S V \S
Algorithm for 3-spanner Phase 1 : Clustering 1. S : select each vertex independently with probability p. 2. Process each v Є V \S as follows 1. If v is not adjacent to any sampled vertex. add all its edges. 2. If v is adjacent to some sampled vertex. weights v x S V \S
Algorithm for 3-spanner Phase 1 : Clustering 1. S : select each vertex independently with probability p 2. Process each v Є V \S as follows 1. If v is not adjacent to any sampled vertex. add all its edges. 2. If v is adjacent to some sampled vertex. weights v x S V \S
Algorithm for 3-spanner Phase 1 : Clustering 1. S : select each vertex independently with probability p 2. Process each v Є V \S as follows 1. If v is not adjacent to any sampled vertex. add all its edges. 2. If v is adjacent to some sampled vertex. weights x v S V \S
Algorithm for 3-spanner Phase 1 : Clustering G=(V,E)G=(V 1,E 1 ) Phase 1 Spanner (partial) Remaining Red edges
Algorithm for 3-spanner Phase 1 : Clustering G=(V,E)G=(V 1,E 1 ) Every v Є V 1 is clustered vo Phase 1 Spanner (partial) Remaining Red edges
Algorithm for 3-spanner Phase 1 : Clustering G=(V,E)G=(V 1,E 1 ) Every v Є V 1 is clustered Every red edge (w-v) Є E 1 is vo Phase 1 Spanner (partial) Remaining Red edges
Algorithm for 3-spanner Phase 1 : Clustering G=(V,E)G=(V 1,E 1 ) Every v Є V 1 is clustered Every red edge (w-v) Є E 1 is at-least as heavy as (v-o) vo Phase 1 Spanner (partial) Remaining Red edges
Algorithm for 3-spanner Phase 1 : Clustering G=(V,E)G=(V 1,E 1 ) Every v Є V 1 is clustered Every red edge (w-v) Є E 1 is at-least as heavy as (v-o) vo Phase 1 Spanner (partial) Observation I Red edgesRemaining Red edges
Algorithm for 3-spanner Difficult case : much more than edges 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 edges 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 + n 2 p = n 3/2, for p = 1/√n Correctness ??
Spanner has stretch 3 Property holds Spanner has stretch 3 Property P 3 holds xy
xy Both x and y are clustered
Spanner has stretch 3 Property holds Spanner has stretch 3 Property P 3 holds xy yx
xy yx Observation I
Spanner has stretch 3 Property holds Spanner has stretch 3 Property P 3 holds xy yx yx o
xy yx yx o ß α z
xy yx yx o ß α z Observation I
Algorithm for (2k-1)-spanner
n n 1-1/k n 1/k V0V0 V1V1 V k-1 #Vertices#Clusters
Algorithm for (2k-1)-spanner Invariant : At level i, we have graph G=(V i,E i ) Every vertex in V i is clustered For every edge e Є E i i edges e
An open problem Fully Dynamic algorithm for (2k-1)-spanner ?
Thank you