Near optimal streaming algorithms for graph spanners
This presentation is the property of its rightful owner.
Sponsored Links
1 / 58

Near Optimal Streaming algorithms for Graph Spanners PowerPoint PPT Presentation


  • 72 Views
  • Uploaded on
  • Presentation posted in: General

Near Optimal Streaming algorithms for Graph Spanners. Surender Baswana IIT Kanpur. Graph spanner : a subgraph which is sparse and still preserves all-pairs approximate distances. t -spanner. G=(V,E) : an undirected graph, |V|=n, |E|=m, t > 1

Download Presentation

Near Optimal Streaming algorithms for Graph Spanners

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Near optimal streaming algorithms for graph spanners

Near Optimal Streaming algorithms for Graph Spanners

Surender Baswana

IIT Kanpur


Near optimal streaming algorithms for graph spanners

Graph spanner :

a subgraph which is sparse and still preserves all-pairs approximate distances.


T spanner

t-spanner

G=(V,E) : an undirected graph, |V|=n, |E|=m, t > 1

δ(u,v) : distance between u and v in G.

A subgraph GS= (V,ES), where ESis a subset of E such that

for all u,v ε V,

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

t : stretch of the spanner.


Sparseness versus stretch

Sparseness versus stretch

  • Consider a graph modeling some network

  • Edges correspond to possible links.

  • Each edge has certain cost.

    Aim : to select as few edges as possible without

    increasing the pair wise distance too much.


T spanner1

t-spanner

  • Computing a t-spanner of smallest possible size is NP-complete.

  • For a graph on n vertices, how large can a t-spanner be ?

v

u


T spanner2

t-spanner

  • Computing a t-spanner of smallest possible size is NP-complete.

  • For a graph on n vertices, how large can a t-spanner be ?

v

u


T spanner3

t-spanner

  • Computing a t-spanner of smallest possible size is NP-complete.

  • For a graph on n vertices, how large can a t-spanner be ?

v

u

2-spanner may

require Ω(n2) edges


T spanner4

t-spanner

  • [Erdös 1963, Bollobas, Bondy & Simonovits]

    “There are graphs on n vertices for which every 2k-spanner or

    a (2k-1)- spanner has Ω(n1+1/k) edges.”

G=(V,E)

GS=(V,ES), |ES|=O(n1+1/k)

GSis (2k-1)-spanner

ALGORITHM


Algorithms for t spanner ram model

Algorithms for t-spanner(RAM model)


Algorithms for t spanner ram model1

Algorithms for t-spanner(RAM model)

  • avoids distance computation altogether.

  • near optimal algorithms in parallel, external-memory, distributed environment


Computing a t spanner in streaming environment

Computing a t-spanner in streaming environment

Input : n, m, k, and a stream of edges of an unweighted graph

Aim : to compute a (2k-1)-spanner

Efficiency measures :

1. number of passes

2. space (memory) required

3. time to process the entire stream


Computing a t spanner in streaming environment1

Computing a t-spanner in streaming environment

Input : n, m, k, and a stream of edges of an unweighted graph

Aim : to compute a (2k-1)-spanner

Algo 1 : Streaming model

Efficiency measures :

1. number of passes 1

2. space (memory) requiredO(kn1+1/k)

3. time to process the entire stream O(m)


Computing a t spanner in streaming environment2

Computing a t-spanner in streaming environment

Input : n, m, k, and a stream of edges of an unweighted graph

Aim : to compute a (2k-1)-spanner

[Feigenbaum et al., SODA 2005]

Efficiency measures :

1. number of passes 1

2. space (memory) requiredO(kn1+1/k) for (2k+1)-spanner

3. time to process the entire stream O(mn1/k)


Computing a t spanner in streaming environment3

Computing a t-spanner in streaming environment

Input : n, m, k, and a stream of edges of a weighted graph

Aim : to compute a (2k-1)-spanner

Algo 2 : StreamSort model

Efficiency measures :

1. number of passes O(k)

2. working memory requiredO(log n) bits

3. time spent in one stream pass O(m)


Relation to previous results

Relation to previous results

  • slightly different hierarchy

  • simple buffering technique

B. & Sen, 2003

Feigenbaum et al.,

2005

Algo 1

Algo 2


Near optimal streaming algorithms for graph spanners

Algorithm 1


Intuition

Intuition

u


Near optimal streaming algorithms for graph spanners

Intuition

Spanner edge

u


Near optimal streaming algorithms for graph spanners

Intuition

Spanner edge

u


Cluster

Cluster

v

o

u

C(x) : center of cluster containingx

Radius : maximum distance from center to a vertex in the cluster

Clustering : a set of disjoint clusters


Near optimal streaming algorithms for graph spanners

Preprocessing : Clustering for the initial (empty) graph

K

K-1

2

1

0


Near optimal streaming algorithms for graph spanners

Preprocessing : Clustering for the initial (empty) graph

K

K-1

2

1

0

Sampling probability = n-1/k


Near optimal streaming algorithms for graph spanners

Preprocessing : Clustering for the initial (empty) graph

K

K-1

2

1

0

Sampling probability = n-1/k


Near optimal streaming algorithms for graph spanners

Preprocessing : Clustering for the initial (empty) graph

K

0

n1/k

K-1

n1-2/k

2

n1-1/k

1

n

0

Sampling probability = n-1/k


Near optimal streaming algorithms for graph spanners

Preprocessing : Clustering for the initial (empty) graph

K

0

n1/k

K-1

n1-2/k

2

n1-1/k

1

n

0

Sampling probability = n-1/k


Processing the stream of edges

Processing the stream of edges

  • Each vertex u at level i<k-1 wishes to move to higher levels.

    Condition for upward movement :

    “an edge (u,v) such that Ci(v) is a sampled cluster”


Near optimal streaming algorithms for graph spanners

K

K-1

2

1

v

0

v

u


Near optimal streaming algorithms for graph spanners

K

K-1

2

1

v

0

v

u


Near optimal streaming algorithms for graph spanners

K

K-1

2

u

1

v

0

v

u


Near optimal streaming algorithms for graph spanners

K

K-1

2

x

u

1

v

x

0

x

y

v

u


Near optimal streaming algorithms for graph spanners

K

K-1

2

x

y

u

1

v

x

0

x

y

v

u


Near optimal streaming algorithms for graph spanners

K

K-1

y

2

x

y

u

1

v

x

0

x

y

v

u


Near optimal streaming algorithms for graph spanners

K

K-1

y

2

x

y

u

1

v

x

0

x

y

v

u


Near optimal streaming algorithms for graph spanners

K

K-1

u

y

2

x

y

u

1

v

x

0

x

y

v

u


Near optimal streaming algorithms for graph spanners

K

K-1

2

1

0


From perspective of a vertex u

From perspective of a vertex u …

i

u


From perspective of a vertex u1

From perspective of a vertex u …

i

u


From perspective of a vertex u2

From perspective of a vertex u …

i

u


From perspective of a vertex u3

i

u

From perspective of a vertex u …


From perspective of a vertex u4

From perspective of a vertex u …

i

u


From perspective of a vertex u5

x

y

u

x

i

y

u

From perspective of a vertex u …

i+1


Processing an edge u v

Processing an edge (u,v)

x

i+1

y

IfCi(v) is a sampled cluster : Ci+1(u) Ci+1(v);

add (u,v) to spanner;

u moves to level i+1 (or even higher)

Else ifCi(v) was not adjacent to u earlier :

add edge (u,v) to spanner;

Else Discard (u,v)

u

x

i

y

u


Near optimal streaming algorithms for graph spanners

K

0

n1/k

K-1

n1-2/k

2

n1-1/k

1

n

0


Size and stretch of spanner

i

u

Size and stretch of spanner

  • Expected number of spanner edges contributed by a vertex

    = O(k n1/k).

  • Radius of a cluster at level i is at most i.

    For each edge discarded, there is a path in spanner

    of length (2i+1)


Size and stretch of spanner1

Size and stretch of spanner

  • Expected number of spanner edges contributed by a vertex

    = O(k n1/k).

  • Radius of a cluster at level i is at most i.

    A single pass streaming algorithm

    A (2k-1)-spanner of expected size O(kn1+1/k)


Running time of the algorithm

Running time of the algorithm

i

u

v

IfCi(v) is a sampled cluster : Ci+1(u) Ci+1(v);

add (u,v) to spanner;

u moves to level i+1 (or even higher)

Else ifCi(v) was not adjacent to u earlier θ(n1/k)time

add edge (u,v) to spanner;

Else Discard (u,v)


Slight modification

Slight modification

  • Each vertex u keeps two buffers for storing edges incident from clusters at its present level.

    1. Temp(u)

    2. Es(u)

  • Whenever u moves to higher level, move all the edges of

    Temp(u) and Es(u) to the spanner.


Modified algorithm

u

v

Modified algorithm

i

IfCi(v) is a sampled cluster : Ci+1(u) Ci+1(v);

add (u,v) to spanner;

u moves to level i+1 (or even higher)

Else add (u,v) to Temp(u) and Prune(u) if Temp(u) ≥ ES(u)


Near optimal streaming algorithms for graph spanners

Adding edges to Temp(u)

u


Near optimal streaming algorithms for graph spanners

Adding edges to Temp(u)

u


Near optimal streaming algorithms for graph spanners

u

Prune(u)

u


Time complexity analysis

Time complexity analysis

  • Prune(u) can be executed in O(|Temp(u)| + |Es(u)|) time using an

    an auxiliary O(n) space.

  • when isPrune(u) executed ?


Time complexity analysis1

Time complexity analysis

  • Prune(u) can be executed in O(|Temp(u)| + |Es(u)|) time using an

    an auxiliary O(n) space.

  • Prune(u) is executed only when |Temp(u)| ≥ |Es(u)|


Time complexity analysis2

Time complexity analysis

  • Prune(u) can be executed in O(|Temp(u)| + |Es(u)|) time using an

    an auxiliary O(n) space.

  • Prune(u) is executed only when |Temp(u)| ≥ |Es(u)|

  • We can charge O(1) cost to each edge in Temp(u).


Time complexity analysis3

Time complexity analysis

  • Prune(u) can be executed in O(|Temp(u)| + |Es(u)|) time using an

    an auxiliary O(n) space.

  • Prune(u) is executed only when |Temp(u)| ≥ |Es(u)|

  • We can charge O(1) cost to each edge in Temp(u).

  • An edge is processed in Temp(u) at most once.


Time complexity analysis4

Time complexity analysis

  • Prune(u) can be executed in O(|Temp(u)| + |Es(u)|) time using an

    an auxiliary O(n) space.

  • Prune(u) is executed only when |Temp(u)| ≥ |Es(u)|

  • We can charge O(1) cost to each edge in Temp(u).

  • An edge is processed in Temp(u) at most once.

Total time spent in processing the stream = O(m)


Size of 2k 1 spanner

Size of (2k-1)-spanner

  • Expected size of |Es(u)| = O(n1/k)

  • Temp(u) never exceeds |Es(u)| +1.

    Expected size of (2k-1)-spanner is O(k n1+1/k)


Conclusion

Conclusion

THEOREM 1 :

Given any k εN, a (2k-1)-spanner of expected size O(kn1+1/k) for any unweighted graph can be computed in one Stream pass with O(m) time to process the entire stream of edges.

THEOREM 2 :

Given any k εN, a (2k-1)-spanner of expected size O(kn1+1/k) for any weighted graph can be computed in O(k)StreamSort passes with O(log n) bits of working memory.


  • Login