Near Optimal Streaming algorithms for Graph Spanners - PowerPoint PPT Presentation

About This Presentation
Title:

Near Optimal Streaming algorithms for Graph Spanners

Description:

Near Optimal Streaming algorithms for Graph Spanners. Surender Baswana. IIT ... near optimal algorithms in parallel, external-memory, distributed environment ... – PowerPoint PPT presentation

Number of Views:98
Avg rating:3.0/5.0
Slides: 59
Provided by: dshi7
Category:

less

Transcript and Presenter's Notes

Title: Near Optimal Streaming algorithms for Graph Spanners


1
Near Optimal Streaming algorithms for Graph
Spanners
  • Surender Baswana
  • IIT Kanpur

2
  • Graph spanner
  • a subgraph which is sparse and still
    preserves all-pairs approximate distances.

3
t-spanner
  • G(V,E) an undirected graph, Vn, Em, t gt
    1
  • d(u,v) distance between u and v in G.
  • A subgraph GS (V,ES), where ES is a subset of E
    such that
  • for all u,v e V,
  • d(u,v) dS(u,v) t
    d(u,v)
  • t stretch of the spanner.

4
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.

5
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
6
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
7
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 O(n2) edges
8
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 O(n11/k)
    edges.

G(V,E)
GS(V,ES), ESO(n11/k) GS is
(2k-1)-spanner
ALGORITHM
9
Algorithms for t-spanner(RAM model)
Stretch Size Running time
Das et al., 1991 2k-1 O(n11/k) O(mn11/k) Deterministic
Roditty et al. 2004 2k-1 O(n11/k) O(n21/k) Deterministic
B Sen, 2003 2k-1 O(kn11/k) O(km) Randomized
Roditty et al., 2005 2k-1 O(kn11/k) O(km) Deterministic
10
Algorithms for t-spanner(RAM model)
Stretch Size Running time
Das et al., 1991 2k-1 O(n11/k) O(mn11/k) Deterministic
Roditty et al. 2004 2k-1 O(n11/k) O(n21/k) Deterministic
B Sen, 2003 2k-1 O(kn11/k) O(km) Randomized
Roditty et al., 2005 2k-1 O(kn11/k) O(km) Deterministic
  • avoids distance computation altogether.
  • near optimal algorithms in parallel,
    external-memory, distributed environment

11
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

12
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) required O(kn11/k)
  • 3. time to process the entire stream O(m)

13
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) required O(kn11/k) for
    (2k1)-spanner
  • 3. time to process the entire stream O(mn1/k)

14
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 required O(log n) bits
  • 3. time spent in one stream pass O(m)

15
Relation to previous results
  • slightly different hierarchy
  • simple buffering technique

B. Sen, 2003
Feigenbaum et al., 2005
Algo 1
Algo 2
16
  • Algorithm 1

17
Intuition
u
18
Intuition
Spanner edge
u
19
Intuition
Spanner edge
u
20
Cluster
v
o
u
C(x) center of cluster containing x
Radius maximum distance from center to a vertex
in the cluster
Clustering a set of disjoint clusters
21
Preprocessing Clustering for the initial
(empty) graph
K
K-1
2
1
0
22
Preprocessing Clustering for the initial
(empty) graph
K
K-1
2
1
0
Sampling probability n-1/k
23
Preprocessing Clustering for the initial
(empty) graph
K
K-1
2
1
0
Sampling probability n-1/k
24
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
25
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
26
Processing the stream of edges
  • Each vertex u at level iltk-1 wishes to move to
    higher levels.
  • Condition for upward movement
  • an edge (u,v) such that Ci(v) is a
    sampled cluster

27
K
K-1
2
1
v
0
u
v
28
K
K-1
2
1
v
0
u
v
29
K
K-1
2
u
1
v
0
u
v
30
K
K-1
2
x
u
1
v
x
0
y
x
u
v
31
K
K-1
2
x
u
y
1
v
x
0
y
x
u
v
32
K
K-1
y
2
x
u
y
1
v
x
0
y
x
u
v
33
K
K-1
y
2
x
u
y
1
v
x
0
y
x
u
v
34
K
K-1
u
y
2
x
u
y
1
v
x
0
y
x
u
v
35
K
K-1
2
1
0
36
From perspective of a vertex u
i
u
37
From perspective of a vertex u
i
u
38
From perspective of a vertex u
i
u
39
From perspective of a vertex u
40
From perspective of a vertex u
i
u
41
From perspective of a vertex u
i1
42
Processing an edge (u,v)
x
i1
y
  • If Ci(v) is a sampled cluster Ci1(u) ?
    Ci1(v)

  • add (u,v) to spanner

  • u moves to level i1 (or even higher)
  • Else if Ci(v) was not adjacent to u earlier
  • add edge (u,v) to
    spanner
  • Else Discard (u,v)

u
x
i
y
u
43
K
0
n1/k
K-1
n1-2/k
2
n1-1/k
1
n
0
44
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 (2i1)

45
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(kn11/k)

46
Running time of the algorithm
i
u
v
If Ci(v) is a sampled cluster Ci1(u) ?
Ci1(v)
add (u,v) to spanner
u moves to
level i1 (or even higher) Else if Ci(v) was not
adjacent to u earlier ?(n1/k) time
add edge (u,v) to
spanner Else Discard (u,v)
47
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.

48
Modified algorithm
i
If Ci(v) is a sampled cluster Ci1(u) ?
Ci1(v)
add (u,v) to spanner
u moves to
level i1 (or even higher) Else add (u,v) to
Temp(u) and Prune(u) if Temp(u) ES(u)
49
Adding edges to Temp(u)
u
50
Adding edges to Temp(u)
u
51
Prune(u)
u
52
Time complexity analysis
  • Prune(u) can be executed in O(Temp(u)
    Es(u)) time using an
  • an auxiliary O(n) space.
  • when is Prune(u) executed ?

53
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)

54
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).

55
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.

56
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)
57
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
    n11/k)

58
Conclusion
  • THEOREM 1
  • Given any k e N, a (2k-1)-spanner of
    expected size O(kn11/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 e N, a (2k-1)-spanner of
    expected size O(kn11/k) for any weighted graph
    can be computed in O(k) StreamSort passes with
    O(log n) bits of working memory.
Write a Comment
User Comments (0)
About PowerShow.com