a randomized linear time algorithm for graph spanners surender baswana postdoctoral researcher max...

Post on 18-Jan-2018

227 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

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

TRANSCRIPT

A randomized linear time algorithm A randomized linear time algorithm forfor

graph spannersgraph spanners

Surender Baswana

Postdoctoral Researcher Max Planck Institute for Computer Science

Saarbruecken, Germany

Graph SpannersGraph SpannersDefinition :

Given a graph G=(V,E), a spanner is a sub-graph G=(V,Es) which has the following two crucial properties

Graph SpannersGraph SpannersDefinition :

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 SpannersGraph SpannersDefinition :

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 SpannersGraph SpannersDefinition :

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 SpannersGraph SpannersDefinition :

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 :Communication network :Motivation for spannersMotivation for spanners

Communication network :Communication network :Motivation for spannersMotivation for spanners

Each edge has• cost• weight (length)

Communication network :Communication network :Motivation for spannersMotivation for spanners

Minimizing the total cost : sparseness is desirable

Communication network :Communication network :Motivation for spannersMotivation for spanners

Minimizing the total cost : sparseness is desirable

u

v

Communication network :Communication network :Motivation for spannersMotivation for spanners

Minimizing the pair-wise distances : small stretch is desirable

Communication network :Communication network :Motivation for spannersMotivation for spanners

Minimizing the pair-wise distances : small stretch is desirable

Graph spannersGraph spanners A trade off between sparseness and stretch

Graph spannersGraph spanners A trade off between sparseness and stretch

Sparse

δ(u,v) ≤ δs(u,v) ≤ t δ(u,v)

Graph spannersGraph 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 SpannerApplications 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 talkOrganization of the talk

Optimal size of a t-spanner

Earlier algorithms

A algorithm

Optimal size of a t-spanner

Optimal size of aOptimal size of a tt--spannerspanner

u v

Optimal size of aOptimal size of a tt--spannerspanner

u v

Optimal size of aOptimal size of a tt--spannerspanner

u v

???Length of Smallest cycle= t

Optimal size of aOptimal size of a tt--spannerspanner

u v

stretch ≥ t-1Length of Smallest cycle= t

Optimal size of aOptimal size of a tt--spannerspanner

u v

stretch ≥ t-1Length of Smallest cycle= t

How dense can a graph with shortest cycle length ≥ t be ?

Optimal size of aOptimal size of a tt--spannerspanner

u v

stretch ≥ t-1

Girth Conjecture [Erdös[1960], Bondy & Simonovits [1974], Bollobas [1978]]There are graph with shortest cycle length > 2k and Ω(n1+1/k) edges

Length of Smallest cycle= t

Optimal size of aOptimal size of a tt--spannerspannerLet k be any positive integer

There are graphs whose (2k-1)-spanner (a 2k-spanner) must have Ω(n1+1/k) edges

Optimal size of aOptimal size of a tt--spannerspannerLet 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 AlgorithmistAim of an Algorithmist To design an algorithm A A such that

AAG=(V, E) G=(V, Es)

|ES| = O (minimum (m , n1+1/k))

Input Graph (2k-1)-Spanner

Earlier algorithms for (2k-1)-spanner

Earlier algorithms for graph Earlier algorithms for graph spannersspanners

Althofer, Das, Dobkin,Joseph, Soares

DCG 1993 2k-1 O(mn1+1/k) O(n1+1/k)

Cohen SIAM J. Computing1998

(2k-1)(1+ε)

O(mn1/k) O(n1+1/k)

Thorup, Zwick

JACM 2005

2k-1 O(mn1/k) (randomized)

O(n1+1/k)

Stretch ConstructionTime

Size

Althofer, Das, Dobkin,Joseph, Soares

DCG 1993 2k-1 O(mn1+1/k) O(n1+1/k)

Cohen SIAM J. Computing 1998

(2k-1)(1+ε)

O(mn1/k) O(n1+1/k)

Thorup, Zwick

JACM 2005

2k-1 O(mn1/k) (randomized)

O(n1+1/k)

Stretch ConstructionTime

Size

Can we Compute Can we Compute (2k-1)-(2k-1)-spanners in linear time ?spanners in linear time ?

A algorithm

Computing a Computing a (2k-1)-(2k-1)-spanner in expectedspanner in expected O(m)O(m) timetime

Local approachLocal approachLet G=(V,ES) be a spanner of G=(V,E)

Edge in Spanner

Edge not in Spanner

Local approachLocal approachLet G=(V,ES) be a spanner of G=(V,E)

Edge in Spanner

Edge not in Spanner

Local approachLocal approachLet G=(V,ES) be a spanner of G=(V,E)

2

1 t-1≤w

≤w ≤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

Edge not in Spanner

Edge in Spanner

Local approachLocal approachLet G=(V,ES) be a spanner of G=(V,E)

u v

2

1 t-1≤w

≤w ≤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

Edge not in Spanner

Edge in Spanner

Local approachLocal approachLet G=(V,ES) be a spanner of G=(V,E)

u v

2

1 t-1≤w

≤w ≤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

Edge not in Spanner

Edge in Spanner

t-spanner

NewNew Algorithms for ( Algorithms for (2k-12k-1)-)-spannerspanner

An External-memory algorithm for (2k-1)-spanner

Time complexity : Integer sorting

NewNew Algorithms for ( Algorithms for (2k-12k-1)-)-spannerspanner

A distributed algorithm for (2k-1)-spanner :

Number of Rounds : O(1) , Communication complexity : O(m) (linear)

NewNew Algorithms for ( Algorithms for (2k-12k-1)-)-spannerspanner

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-spannerAlgorithm for 3-spannerEasy caseEasy case : fewer than : fewer than n½ edges edges

Algorithm for 3-spannerAlgorithm for 3-spannerDifficult caseDifficult case : much more than : much more than n½ edges edges

Algorithm for 3-spannerAlgorithm for 3-spannerDifficult caseDifficult case : much more than : much more than n½ edges edges

Which n½ edges to select ?

Algorithm for 3-spannerAlgorithm for 3-spanner Phase 1 : Clustering

Phase 2 : Adding edges between vertices and clusters

Initially all edges are Red

Algorithm for 3-spannerAlgorithm for 3-spanner Phase 1 : Clustering

Phase 2 : Adding edges between vertices and clusters

center

Initially all edges are Red

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

1. S : select each vertex independently with probability p.

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

1. S : select each vertex independently with probability p.

2. Process each v Є V \S as follows

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

1. S : select each vertex independently with probability p.

2. Process each v Є V \S as follows1. If v is not adjacent to any sampled vertex

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

1. S : select each vertex independently with probability p .

2. Process each v Є V \S as follows1. If v is not adjacent to any sampled vertex.

v

S

V \S

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

1. S : select each vertex independently with probability p .

2. Process each v Є V \S as follows1. If v is not adjacent to any sampled vertex. add all its

edges.

v

S

V \S

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

1. S : select each vertex independently with probability p.

2. Process each v Є V \S as follows1. 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-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

1. S : select each vertex independently with probability p .

2. Process each v Є V \S as follows1. 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-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

1. S : select each vertex independently with probability p.

2. Process each v Є V \S as follows1. 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-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

1. S : select each vertex independently with probability p2. 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-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

1. S : select each vertex independently with probability p2. 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-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

G=(V,E) G=(V1,E1)Phase 1

Spanner (partial)

RemainingRed edges

Red edges

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

G=(V,E) G=(V1,E1)

Every v Є V1 is clustered

v o

Phase 1

Spanner (partial)

RemainingRed edges

Red edges

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

G=(V,E) G=(V1,E1)

Every v Є V1 is clustered Every red edge (w-v) Є E1 is ......

v o

Phase 1

Spanner (partial)

RemainingRed edges

Red edges

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

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)

v o

Phase 1

Spanner (partial)

RemainingRed edges

Red edges

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 1 : Phase 1 : ClusteringClustering

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)

v o

Phase 1

Spanner (partial)

Observation I

Red edges RemainingRed edges

Algorithm for 3-spannerAlgorithm for 3-spannerDifficult caseDifficult case : much more than : much more than n½ edges edges

Which n½ edges to select ?

Algorithm for 3-spannerAlgorithm for 3-spannerDifficult caseDifficult case : much more than : much more than n½ edges edges

v

Algorithm for 3-spannerAlgorithm for 3-spannerPhase 2 : Phase 2 : adding edges between vertices and adding edges between vertices and

clustersclusters

v

Analysis of the algorithmAnalysis 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 3Spanner has stretch 3PropertyProperty P3 holdsholds

x y

Spanner has stretch 3Spanner has stretch 3PropertyProperty P3 holdsholds

x y

Both x and y are clustered

Spanner has stretch 3Spanner has stretch 3PropertyProperty P3 holdsholds

x y

yx

Spanner has stretch 3Spanner has stretch 3PropertyProperty P3 holdsholds

x y

yxObservation I

Spanner has stretch 3Spanner has stretch 3PropertyProperty P3 holdsholds

x y

yx yxo

Spanner has stretch 3Spanner has stretch 3PropertyProperty P3 holdsholds

x y

yx yxo

ß

α

z

Spanner has stretch 3Spanner has stretch 3PropertyProperty P3 holdsholds

x y

yx yxo

ß

α

z

Observation I

Algorithm for (Algorithm for (2k-12k-1)-spanner)-spanner

Algorithm for (Algorithm for (2k-12k-1)-spanner)-spanner

n

n1-1/k

n1/k

V0

V1

Vk-1

#Vertices #Clusters

Algorithm for (Algorithm for (2k-12k-1)-spanner)-spanner Invariant : At level i, we have graph G=(Vi,Ei)

Every vertex in Vi is clustered For every edge e Є Ei

i edges

e

An openAn open problemproblem

Fully Dynamic algorithm for (2k-1)-spanner ?

Thank you Thank you

top related