Streaming Model of Computation A streaming algorithm processes a data - - PowerPoint PPT Presentation

โ–ถ
streaming model of computation
SMART_READER_LITE
LIVE PREVIEW

Streaming Model of Computation A streaming algorithm processes a data - - PowerPoint PPT Presentation

Streaming Model of Computation A streaming algorithm processes a data stream : Input is presented as a sequence of items and can be examined in only a few passes (typically just one). The algorithm has limited memory and cannot


slide-1
SLIDE 1

Streaming Model of Computation

A streaming algorithm processes a data stream ๐‘‡:

  • Input is presented as a sequence of items and can be examined in only

a few passes (typically just one).

  • The algorithm has limited memory and cannot store the whole input

sequence.

  • The algorithm can spend limited processing time per item.
  • In some problems we are satisfied with an approximate answer.
  • Approximation algorithms can be based on sketches (summaries) of the

data stream in memory.

slide-2
SLIDE 2

Streaming Graph Algorithms

In many applications we deal with massive graphs. E.g. (vertices โ€“ edges):

  • Web-pages โ€“ hyperlinks
  • Neurons โ€“ synapses
  • IP addresses โ€“ network flows
  • People โ€“ friendships

Processing such graphs with a classic graph algorithm may be infeasible! But it may be possible to use an algorithm developed for the data stream model.

slide-3
SLIDE 3

Streaming Graph Algorithms

In many applications we deal with massive graphs. E.g. (vertices โ€“ edges):

  • Web-pages โ€“ hyperlinks
  • Neurons โ€“ synapses
  • IP addresses โ€“ network flows
  • People โ€“ friendships

Processing such graphs with a classic graph algorithm may be infeasible! But it may be possible to use an algorithm developed for the data stream model. Presentation based on:

  • A. McGregor โ€œGraph Stream Algorithms: A Surveyโ€ [ACM SIGMOD Record 2014]
slide-4
SLIDE 4

Streaming Graph Algorithms

slide-5
SLIDE 5

Streaming Graph Algorithms

Data stream model

  • The input is given by a stream of data. E.g., the stream could be the graph

edges.

  • The algorithm can use a limited amount of memory to process the stream.
  • The input stream must be processed in the order it arrives.

Related goals:

  • Real-time systems.
  • I/O efficiency.
  • Trade-off size and accuracy.
slide-6
SLIDE 6

Streaming Graph Algorithms

Data stream model How much memory should our model allow in order to be able to process a graph with ๐‘œ vertices?

  • Most problems are intractable if space is < ๐‘œ.
  • We will work in the semi-streaming model that allows O(๐‘œ log๐‘™๐‘œ) memory, for

some constant ๐‘™.

  • Some algorithms will be randomized. We will say that an event ๐น occurs with

high probability if Pr ๐น โ‰ฅ 1 โˆ’ 1/๐‘œ.

slide-7
SLIDE 7

Streaming Graph Algorithms

Graph connectivity Data stream ๐‘‡: Edges of a graph ๐ป = (๐‘Š, ๐น) with ๐‘œ = ๐‘Š 1 2 3 4 ๐ป E.g., data stream ๐‘‡ = (1,2), (2,3), (1,3), (3,4)

slide-8
SLIDE 8

Streaming Graph Algorithms

Graph connectivity Data stream ๐‘‡: Edges of a graph ๐ป = (๐‘Š, ๐น) with ๐‘œ = ๐‘Š The goal is to test if ๐ป is connected, i.e., for any two vertices there is a path that connects them. ๐‘ฆ ๐‘ง ๐ป

slide-9
SLIDE 9

Streaming Graph Algorithms

Graph connectivity Data stream ๐‘‡: Edges of a graph ๐ป = (๐‘Š, ๐น) with ๐‘œ = ๐‘Š The goal is to test if ๐ป is connected, i.e., for any two vertices there is a path that connects them. ๐‘ฆ ๐‘ง ๐ป Simple algorithm: Maintain a set of edges ๐ผ. When we read the next edge (๐‘ฃ, ๐‘ค) from the stream, we add it to ๐ผ if there is currently no path between ๐‘ฃ and ๐‘ค.

slide-10
SLIDE 10

Streaming Graph Algorithms

Spanners ๐‘-spanner ๐ผ of a graph ๐ป = (๐‘Š, ๐น): subgraph of ๐ป such that for all pairs ๐‘ฃ, ๐‘ค โˆˆ ๐‘Š,

๐‘’๐ป(๐‘ฃ, ๐‘ค) โ‰ค ๐‘’๐ผ(๐‘ฃ, ๐‘ค) โ‰ค ๐‘ โˆ™ ๐‘’๐ป(๐‘ฃ, ๐‘ค)

๐‘’๐ป ๐‘ฃ, ๐‘ค = length of the shortest path between ๐‘ฃ and ๐‘ค in ๐ป ๐‘’๐ผ ๐‘ฃ, ๐‘ค = length of the shortest path between ๐‘ฃ and ๐‘ค in ๐ผ 1 2 3 4 ๐ป

slide-11
SLIDE 11

Streaming Graph Algorithms

Spanners ๐‘-spanner ๐ผ of a graph ๐ป = (๐‘Š, ๐น): subgraph of ๐ป such that for all pairs ๐‘ฃ, ๐‘ค โˆˆ ๐‘Š,

๐‘’๐ป(๐‘ฃ, ๐‘ค) โ‰ค ๐‘’๐ผ(๐‘ฃ, ๐‘ค) โ‰ค ๐‘ โˆ™ ๐‘’๐ป(๐‘ฃ, ๐‘ค)

๐‘’๐ป ๐‘ฃ, ๐‘ค = length of the shortest path between ๐‘ฃ and ๐‘ค in ๐ป ๐‘’๐ผ ๐‘ฃ, ๐‘ค = length of the shortest path between ๐‘ฃ and ๐‘ค in ๐ผ 1 2 3 4 1 2 3 4 ๐ป ๐ผ 2-spanner

slide-12
SLIDE 12

Streaming Graph Algorithms

Spanners Construction of an ๐‘-spanner ๐ผ: add next edge (๐‘ฃ, ๐‘ค) if it does not create a short cycle in ๐ผ Greedy Spanner Algorithm 1. ๐ผ โ† โˆ… 2. for

  • r each edge (๐‘ฃ, ๐‘ค) โˆˆ ๐‘‡ do

do 3. if if ๐‘’๐ผ ๐‘ฃ, ๐‘ค > ๐‘ the then add (๐‘ฃ, ๐‘ค) to ๐ผ 4. ret eturn ๐ผ

  • Does this work?
  • What is the size (#edges) of the spanner?
slide-13
SLIDE 13

Streaming Graph Algorithms

Spanners Proof that the Greedy Spanner Algorithm works: For any edge (๐‘ฆ, ๐‘ง) of ๐ป we have ๐‘’๐ผ ๐‘ฆ, ๐‘ง โ‰ค ๐‘. Length of ๐‘„ in ๐ป = ๐‘™ = ๐‘’๐ป ๐‘ค0, ๐‘ค1 + ๐‘’๐ป ๐‘ค1, ๐‘ค2 + โ‹ฏ + ๐‘’๐ป ๐‘ค๐‘™โˆ’1, ๐‘ค๐‘™ ๐‘ค0 ๐‘ค1

๐‘ค๐‘™โˆ’1

๐‘ค๐‘™ ๐‘„ ๐‘’๐ผ ๐‘ค0, ๐‘ค1 โ‰ค ๐‘ ๐‘’๐ผ ๐‘ค๐‘™โˆ’1, ๐‘ค๐‘™ โ‰ค ๐‘ Consider a path ๐‘„ = ๐‘ค0, ๐‘ค1, . . , ๐‘ค๐‘™โˆ’1, ๐‘ค๐‘™ in ๐ป

slide-14
SLIDE 14

Streaming Graph Algorithms

Spanners Proof that the Greedy Spanner Algorithm works: For any edge (๐‘ฆ, ๐‘ง) of ๐ป we have ๐‘’๐ผ ๐‘ฆ, ๐‘ง โ‰ค ๐‘. Length of ๐‘„ in ๐ป = ๐‘™ = ๐‘’๐ป ๐‘ค0, ๐‘ค1 + ๐‘’๐ป ๐‘ค1, ๐‘ค2 + โ‹ฏ + ๐‘’๐ป ๐‘ค๐‘™โˆ’1, ๐‘ค๐‘™ ๐‘ค0 ๐‘ค1

๐‘ค๐‘™โˆ’1

๐‘ค๐‘™ ๐‘„ ๐‘’๐ผ ๐‘ค0, ๐‘ค1 โ‰ค ๐‘ ๐‘’๐ผ ๐‘ค๐‘™โˆ’1, ๐‘ค๐‘™ โ‰ค ๐‘ Length in ๐ผ โ‰ค ๐‘’๐ผ ๐‘ค0, ๐‘ค1 + ๐‘’๐ผ ๐‘ค1, ๐‘ค2 + โ‹ฏ + ๐‘’๐ผ ๐‘ค๐‘™โˆ’1, ๐‘ค๐‘™ Consider a path ๐‘„ = ๐‘ค0, ๐‘ค1, . . , ๐‘ค๐‘™โˆ’1, ๐‘ค๐‘™ in ๐ป โ‰ค ๐‘ โˆ™ ๐‘’๐ป ๐‘ค0, ๐‘ค1 + ๐‘ โˆ™ ๐‘’๐ป ๐‘ค1, ๐‘ค2 + โ‹ฏ + ๐‘ โˆ™ ๐‘’๐ป ๐‘ค๐‘™โˆ’1, ๐‘ค๐‘™ = ๐‘ โˆ™ ๐‘™

slide-15
SLIDE 15

Streaming Graph Algorithms

Spanners How many edges are inserted into ๐ผ?

  • By a known result in Graph Theory, any such graph has at most

O ๐‘œ1+ ฮค

1 ๐‘ข

  • Let ๐‘ = 2๐‘ข โˆ’ 1, for some integer ๐‘ข.
  • Then ๐ผ does not contain cycles of length < 2๐‘ข.

edges.

slide-16
SLIDE 16

Streaming Graph Algorithms

Minimum Spanning Tree Data stream ๐‘‡: Edges of a weighted graph ๐ป = (๐‘Š, ๐น, ๐‘ฅ) with ๐‘œ = ๐‘Š Greedy MST Algorithm 1. ๐ผ โ† โˆ… 2. for

  • r each edge ๐‘“ = (๐‘ฃ, ๐‘ค) โˆˆ ๐‘‡ do

do 3. if if ๐‘“ creates a cycle ๐ท in ๐ผ th then 4. find the maximum weight edge ๐‘” โˆˆ ๐ท 5. add ๐‘“ to ๐ผ 6. delete ๐‘” from ๐ผ 7. ret eturn ๐ผ Construction: if next edge (๐‘ฃ, ๐‘ค) creates a cycle ๐ท in ๐ผ, delete from ๐ผ the maximum weight edge of ๐ท.

slide-17
SLIDE 17

Streaming Graph Algorithms

Graph Sparsification Given a graph ๐ป = (๐‘Š, ๐น) we want to construct a weighted subgraph ๐ผ = (๐‘Š, ๐น๐ผ, ๐‘ฅ) of ๐ป that estimates various (connectivity) properties of ๐ป E.g.:

  • Cut sparsification [Benczur-Karger]
  • Spectral sparsification [Spielman-Teng]
slide-18
SLIDE 18

Streaming Graph Algorithms

Picture from https://simons.berkeley.edu/sites/default/files/docs/1768/slidessrivastava1.pdf

slide-19
SLIDE 19

Streaming Graph Algorithms

Cuts in Graphs Weighted graph ๐ป = (๐‘Š, ๐น, ๐‘ฅ). Edge weights ๐‘ฅ โˆถ ๐น โ†’ ๐‘† ๐ต-cut: partition of ๐‘Š into two sets ๐ต and ๐‘Š\๐ต ๐œ€๐ป ๐›ฃ = set of edges in ๐ป crossing the ๐ต-cut. ๐œ€๐ป ๐›ฃ =

๐‘ฃ, ๐‘ค โˆˆ ๐น โˆถ ๐‘ฃ โˆˆ ๐ต, ๐‘ค โˆˆ ๐‘Š\A

Size of ๐ต-cut in ๐ป: ๐œ‡๐ต ๐ป = ฯƒ๐‘“โˆˆ๐œ€๐ป(๐›ฃ) ๐‘ฅ(๐‘“)

slide-20
SLIDE 20

Streaming Graph Algorithms

Cuts in Graphs 26 17 12 14 7 9 20 4 10 ๐‘ ๐‘ ๐‘‘ ๐‘’ ๐‘” ๐‘“ Weighted graph ๐ป = (๐‘Š, ๐น, ๐‘ฅ). Edge weights ๐‘ฅ โˆถ ๐น โ†’ ๐‘† ๐ต-cut: partition of ๐‘Š into two sets ๐ต and ๐‘Š\๐ต ๐œ€๐ป ๐›ฃ = set of edges in ๐ป crossing the ๐ต-cut. ๐œ€๐ป ๐›ฃ =

๐‘ฃ, ๐‘ค โˆˆ ๐น โˆถ ๐‘ฃ โˆˆ ๐ต, ๐‘ค โˆˆ ๐‘Š\A

Size of ๐ต-cut in ๐ป: ๐œ‡๐ต ๐ป = ฯƒ๐‘“โˆˆ๐œ€๐ป(๐›ฃ) ๐‘ฅ(๐‘“)

slide-21
SLIDE 21

Streaming Graph Algorithms

Cuts in Graphs 26 17 12 14 7 9 20 4 10 ๐‘ ๐‘ ๐‘‘ ๐‘’ ๐‘” ๐‘“ Weighted graph ๐ป = (๐‘Š, ๐น, ๐‘ฅ). Edge weights ๐‘ฅ โˆถ ๐น โ†’ ๐‘† ๐ต-cut: partition of ๐‘Š into two sets ๐ต and ๐‘Š\๐ต ๐œ€๐ป ๐›ฃ = set of edges in ๐ป crossing the ๐ต-cut. ๐œ€๐ป ๐›ฃ =

๐‘ฃ, ๐‘ค โˆˆ ๐น โˆถ ๐‘ฃ โˆˆ ๐ต, ๐‘ค โˆˆ ๐‘Š\A

Size of ๐ต-cut in ๐ป: ๐œ‡๐ต ๐ป = ฯƒ๐‘“โˆˆ๐œ€๐ป(๐›ฃ) ๐‘ฅ(๐‘“) ๐œ‡๐ต ๐ป = ๐‘ฅ ๐‘, ๐‘” + ๐‘ฅ ๐‘, ๐‘” + ๐‘ฅ ๐‘‘, ๐‘” + ๐‘ฅ ๐‘‘, ๐‘“ + ๐‘ฅ ๐‘‘, ๐‘’ = 17 + 10 + 9 + 7 + 20 = 63 ๐ต ๐‘Š\๐ต

slide-22
SLIDE 22

Streaming Graph Algorithms

Cuts in Graphs 26 17 12 14 7 9 20 4 10 ๐‘ ๐‘ ๐‘‘ ๐‘’ ๐‘” ๐‘“ Weighted graph ๐ป = (๐‘Š, ๐น, ๐‘ฅ). Edge weights ๐‘ฅ โˆถ ๐น โ†’ ๐‘† ๐ต-cut: partition of ๐‘Š into two sets ๐ต and ๐‘Š\๐ต ๐œ€๐ป ๐›ฃ = set of edges in ๐ป crossing the ๐ต-cut. ๐œ€๐ป ๐›ฃ =

๐‘ฃ, ๐‘ค โˆˆ ๐น โˆถ ๐‘ฃ โˆˆ ๐ต, ๐‘ค โˆˆ ๐‘Š\A

Size of ๐ต-cut in ๐ป: ๐œ‡๐ต ๐ป = ฯƒ๐‘“โˆˆ๐œ€๐ป(๐›ฃ) ๐‘ฅ(๐‘“) ๐œ‡๐ต ๐ป = ๐‘ฅ ๐‘, ๐‘‘ + ๐‘ฅ ๐‘”, ๐‘‘ + ๐‘ฅ ๐‘”, ๐‘“ = 12 + 9 + 14 = 35 ๐ต ๐‘Š\๐ต

slide-23
SLIDE 23

Streaming Graph Algorithms

Cut Sparsification Given a graph ๐ป = (๐‘Š, ๐น) we want to construct a weighted subgraph ๐ผ = (๐‘Š, ๐น๐ผ, ๐‘ฅ) of ๐ป that estimates the size of each cut of ๐ป (1 + ๐œ) cut sparsification

1 โˆ’ ๐œ โˆ™ ๐œ‡๐ต ๐ป โ‰ค ๐œ‡๐ต ๐ผ โ‰ค (1 + ๐œ) โˆ™ ๐œ‡๐ต ๐ป

for all vertex subsets ๐ต โŠ‚ ๐‘Š

slide-24
SLIDE 24

Streaming Graph Algorithms

Graph Laplacian Weighted graph ๐ป = (๐‘Š, ๐น, ๐‘ฅ). Edge weights ๐‘ฅ โˆถ ๐น โ†’ ๐‘† Laplacian of ๐ป: ๐‘œ ร— ๐‘œ real matrix ๐‘€๐ป, ๐‘œ = |๐‘Š|

๐‘€๐ป ๐‘—, ๐‘˜ = เท

๐‘—,๐‘™ โˆˆ๐น

๐‘ฅ ๐‘—, ๐‘™ , ๐‘— = ๐‘˜ โˆ’๐‘ฅ ๐‘—, ๐‘˜ , ๐‘— โ‰  ๐‘˜

where ๐‘ฅ(๐‘—, ๐‘˜) = 0 if (๐‘—, ๐‘˜) โˆ‰ ๐น

slide-25
SLIDE 25

Streaming Graph Algorithms

Graph Laplacian 1 2 4 3 1 2 8 9 3 Weighted graph ๐ป = (๐‘Š, ๐น, ๐‘ฅ). Edge weights ๐‘ฅ โˆถ ๐น โ†’ ๐‘† Laplacian of ๐ป: ๐‘œ ร— ๐‘œ real matrix ๐‘€๐ป, ๐‘œ = |๐‘Š|

๐‘€๐ป ๐‘—, ๐‘˜ = เท

๐‘—,๐‘™ โˆˆ๐น

๐‘ฅ ๐‘—, ๐‘™ , ๐‘— = ๐‘˜ โˆ’๐‘ฅ ๐‘—, ๐‘˜ , ๐‘— โ‰  ๐‘˜

where ๐‘ฅ(๐‘—, ๐‘˜) = 0 if (๐‘—, ๐‘˜) โˆ‰ ๐น ๐‘€๐ป = 14 โˆ’3 โˆ’9 โˆ’2 โˆ’3 4 โˆ’1 โˆ’9 โˆ’1 18 โˆ’8 โˆ’2 โˆ’8 10

slide-26
SLIDE 26

Streaming Graph Algorithms

Graph Laplacian Weighted graph ๐ป = (๐‘Š, ๐น, ๐‘ฅ). Edge weights ๐‘ฅ โˆถ ๐น โ†’ ๐‘† Laplacian of ๐ป: ๐‘œ ร— ๐‘œ real matrix ๐‘€๐ป, ๐‘œ = |๐‘Š|

๐‘€๐ป ๐‘—, ๐‘˜ = เท

๐‘—,๐‘™ โˆˆ๐น

๐‘ฅ ๐‘—, ๐‘™ , ๐‘— = ๐‘˜ โˆ’๐‘ฅ ๐‘—, ๐‘˜ , ๐‘— โ‰  ๐‘˜

where ๐‘ฅ(๐‘—, ๐‘˜) = 0 if (๐‘—, ๐‘˜) โˆ‰ ๐น Let ๐‘ฆ = ๐‘ฆ1 โ‹ฎ ๐‘ฆ๐‘œ be a real vector in โ„๐‘œ. Recall that ๐‘ฆ๐‘ˆ = ๐‘ฆ1 โ‹ฏ ๐‘ฆ๐‘œ

slide-27
SLIDE 27

Streaming Graph Algorithms

Graph Laplacian Weighted graph ๐ป = (๐‘Š, ๐น, ๐‘ฅ). Edge weights ๐‘ฅ โˆถ ๐น โ†’ ๐‘† Laplacian of ๐ป: ๐‘œ ร— ๐‘œ real matrix ๐‘€๐ป, ๐‘œ = |๐‘Š|

๐‘€๐ป ๐‘—, ๐‘˜ = เท

๐‘—,๐‘™ โˆˆ๐น

๐‘ฅ ๐‘—, ๐‘™ , ๐‘— = ๐‘˜ โˆ’๐‘ฅ ๐‘—, ๐‘˜ , ๐‘— โ‰  ๐‘˜

where ๐‘ฅ(๐‘—, ๐‘˜) = 0 if (๐‘—, ๐‘˜) โˆ‰ ๐น Let ๐‘ฆ = ๐‘ฆ1 โ‹ฎ ๐‘ฆ๐‘œ be a real vector in โ„๐‘œ. Recall that ๐‘ฆ๐‘ˆ = ๐‘ฆ1 โ‹ฏ ๐‘ฆ๐‘œ Then

๐‘ฆ๐‘ˆ๐‘€๐ป๐‘ฆ = เท

(๐‘—,๐‘˜)โˆˆ๐น

๐‘ฅ(๐‘—, ๐‘˜) ๐‘ฆ๐‘— โˆ’ ๐‘ฆ๐‘˜

2

slide-28
SLIDE 28

Streaming Graph Algorithms

Spectral Sparsification Graph ๐ป = (๐‘Š, ๐น) A weighted subgraph ๐ผ = (๐‘Š, ๐น๐ผ, ๐‘ฅ) of ๐ป is a (1 + ๐œ) spectral sparsifier of ๐ป if

1 โˆ’ ๐œ โˆ™ ๐‘ฆ๐‘ˆ๐‘€๐ป๐‘ฆ โ‰ค ๐‘ฆ๐‘ˆ๐‘€๐ผ๐‘ฆ โ‰ค (1 + ๐œ) โˆ™ ๐‘ฆ๐‘ˆ๐‘€๐ป๐‘ฆ

for all real vectors ๐‘ฆ โˆˆ โ„๐‘œ

slide-29
SLIDE 29

Streaming Graph Algorithms

Spectral Sparsification Graph ๐ป = (๐‘Š, ๐น) A weighted subgraph ๐ผ = (๐‘Š, ๐น๐ผ, ๐‘ฅ) of ๐ป is a (1 + ๐œ) spectral sparsifier of ๐ป if

1 โˆ’ ๐œ โˆ™ ๐‘ฆ๐‘ˆ๐‘€๐ป๐‘ฆ โ‰ค ๐‘ฆ๐‘ˆ๐‘€๐ผ๐‘ฆ โ‰ค (1 + ๐œ) โˆ™ ๐‘ฆ๐‘ˆ๐‘€๐ป๐‘ฆ

for all real vectors ๐‘ฆ โˆˆ โ„๐‘œ A spectral sparsifier of ๐ป can approximate:

  • Size of all cuts
  • Eigenvalues
  • Effective resistances (in the corresponding electrical network)
  • Properties of random walks
slide-30
SLIDE 30

Streaming Graph Algorithms

Spectral Sparsification Graph ๐ป = (๐‘Š, ๐น) A weighted subgraph ๐ผ = (๐‘Š, ๐น๐ผ, ๐‘ฅ) of ๐ป is a (1 + ๐œ) spectral sparsifier of ๐ป if

1 โˆ’ ๐œ โˆ™ ๐‘ฆ๐‘ˆ๐‘€๐ป๐‘ฆ โ‰ค ๐‘ฆ๐‘ˆ๐‘€๐ผ๐‘ฆ โ‰ค (1 + ๐œ) โˆ™ ๐‘ฆ๐‘ˆ๐‘€๐ป๐‘ฆ

for all real vectors ๐‘ฆ โˆˆ โ„๐‘œ Theorem [Spielman and Teng] A (1 + ๐œ) spectral sparsifier with O(๐‘œ log ๐‘œ /๐œ2) edges can be constructed in O(๐‘› polylog(๐‘œ)/๐œ2), where ๐‘œ is the number of vertices and ๐‘› is the number of edges of the input graph.

slide-31
SLIDE 31

Streaming Graph Algorithms

Spectral Sparsification Graph ๐ป = (๐‘Š, ๐น) A weighted subgraph ๐ผ = (๐‘Š, ๐น๐ผ, ๐‘ฅ) of ๐ป is a (1 + ๐œ) spectral sparsifier of ๐ป if

1 โˆ’ ๐œ โˆ™ ๐‘ฆ๐‘ˆ๐‘€๐ป๐‘ฆ โ‰ค ๐‘ฆ๐‘ˆ๐‘€๐ผ๐‘ฆ โ‰ค (1 + ๐œ) โˆ™ ๐‘ฆ๐‘ˆ๐‘€๐ป๐‘ฆ

for all real vectors ๐‘ฆ โˆˆ โ„๐‘œ Theorem [Spielman and Teng] A (1 + ๐œ) spectral sparsifier with O(๐‘œ log ๐‘œ /๐œ2) edges can be constructed in O(๐‘› polylog(๐‘œ)/๐œ2), where ๐‘œ is the number of vertices and ๐‘› is the number of edges of the input graph. Theorem [Batson, Spielman and Srivastava] A graph with ๐‘œ vertices has a (1 + ๐œ) spectral sparsifier with O(๐‘œ/๐œ2) edges.

slide-32
SLIDE 32

Streaming Graph Algorithms

Spectral Sparsification โ€“ Construction in the semi-streaming model

  • Use as a black box any existing algorithm ALG that returns a (1 + ๐›ฟ)

spectral sparsifier.

  • ALG returns a spectral sparsifier with ๐‘ก๐‘—๐‘จ๐‘“(๐›ฟ) = O(๐‘œ/๐›ฟ2) number of edges.
slide-33
SLIDE 33

Streaming Graph Algorithms

Spectral Sparsification โ€“ Construction in the semi-streaming model

  • Use as a black box any existing algorithm ALG that returns a (1 + ๐›ฟ)

spectral sparsifier.

  • ALG returns a spectral sparsifier with ๐‘ก๐‘—๐‘จ๐‘“(๐›ฟ) = O(๐‘œ/๐›ฟ2) number of edges.

We use the following properties of spectral sparsification

  • Mergeable: Suppose ๐ผ1 and ๐ผ2 are ๐›พ spectral sparsifiers of two graphs

๐ป1 and ๐ป2 on the same set of vertices. Then ๐ผ1 โˆช ๐ผ2 is a ๐›พ spectral sparsifier of ๐ป1 โˆช ๐ป2.

  • Composable: If ๐ผ3 is a ๐›พ spectral sparsifier for ๐ผ2 and ๐ผ2 is a ๐œ€ spectral

sparsifier for ๐ผ1 then ๐ผ3 is a ๐›พ๐œ€ spectral sparsifier for ๐ผ1.

slide-34
SLIDE 34

Streaming Graph Algorithms

Spectral Sparsification โ€“ Construction in the semi-streaming model Let ๐ป = (๐‘Š, ๐น) be the input graph with ๐‘œ = |๐‘Š| and ๐‘› = ๐น Data stream ๐‘‡ = the ๐‘› edges of ๐ป Set ๐‘ข = ๐‘›/๐‘ก๐‘—๐‘จ๐‘“(๐›ฟ). For simplicity assume that ๐‘ข is a power of 2 We divide ๐‘‡ into ๐‘ข segments of ๐‘ก๐‘—๐‘จ๐‘“(๐›ฟ) edges ๐ป๐‘—

0 = graph that consists of the edges in the ๐‘—-th segment

โ€ฆ ๐‘ก๐‘—๐‘จ๐‘“(๐›ฟ) ๐‘ก๐‘—๐‘จ๐‘“(๐›ฟ) ๐‘ก๐‘—๐‘จ๐‘“(๐›ฟ) ๐ป1 ๐ป2 ๐ป๐‘ข ๐‘‡

slide-35
SLIDE 35

Streaming Graph Algorithms

Spectral Sparsification โ€“ Construction in the semi-streaming model Set ๐‘ข = ๐‘›/๐‘ก๐‘—๐‘จ๐‘“(๐›ฟ). For simplicity assume that ๐‘ข is a power of 2 (๐‘ข = 2๐‘™, ๐‘™ = lg ๐‘ข) We divide ๐‘‡ into ๐‘ข segments of ๐‘ก๐‘—๐‘จ๐‘“(๐›ฟ) edges ๐ป๐‘—

0 = graph that consists of the edges in the ๐‘—-th segment

For ๐‘— = 1,2, โ€ฆ , lg ๐‘ข and ๐‘˜ = 1,2, โ€ฆ , ๐‘ข/2๐‘— define ๐ป๐‘—

๐‘˜ = ๐ป2๐‘—โˆ’1 ๐‘˜โˆ’1 โˆช ๐ป2๐‘— ๐‘˜โˆ’1

E.g., for ๐‘ข = 4 ๐ป1

1 = ๐ป1 0 โˆช ๐ป2

๐ป2

1 = ๐ป3 0 โˆช ๐ป4

๐ป1 ๐ป2 ๐ป3 ๐ป4 ๐ป1

2 = ๐ป1 1 โˆช ๐ป2 1 = ๐ป

slide-36
SLIDE 36

Streaming Graph Algorithms

Spectral Sparsification โ€“ Construction in the semi-streaming model Set ๐‘ข = ๐‘›/๐‘ก๐‘—๐‘จ๐‘“(๐›ฟ). For simplicity assume that ๐‘ข is a power of 2 (๐‘ข = 2๐‘™, ๐‘™ = lg ๐‘ข) We divide ๐‘‡ into ๐‘ข segments of ๐‘ก๐‘—๐‘จ๐‘“(๐›ฟ) edges ๐ป๐‘—

0 = graph that consists of the edges in the ๐‘—-th segment

For ๐‘— = 1,2, โ€ฆ , lg ๐‘ข and ๐‘˜ = 1,2, โ€ฆ , ๐‘ข/2๐‘— define ๐ป๐‘—

๐‘˜ = ๐ป2๐‘—โˆ’1 ๐‘˜โˆ’1 โˆช ๐ป2๐‘— ๐‘˜โˆ’1

For each ๐ป๐‘—

๐‘˜ define a weighted subgraph ๐ผ๐‘— ๐‘˜ :

  • ๐ผ๐‘—

0 = ๐ป๐‘—

  • ๐ผ๐‘—

๐‘˜ = ALG(๐ผ2๐‘—โˆ’1 ๐‘˜โˆ’1 โˆช ๐ผ2๐‘— ๐‘˜โˆ’1), ๐‘˜ > 0

slide-37
SLIDE 37

Streaming Graph Algorithms

Spectral Sparsification โ€“ Construction in the semi-streaming model Set ๐‘ข = ๐‘›/๐‘ก๐‘—๐‘จ๐‘“(๐›ฟ). For simplicity assume that ๐‘ข is a power of 2 (๐‘ข = 2๐‘™, ๐‘™ = lg ๐‘ข) We divide ๐‘‡ into ๐‘ข segments of ๐‘ก๐‘—๐‘จ๐‘“(๐›ฟ) edges ๐ป๐‘—

0 = graph that consists of the edges in the ๐‘—-th segment

For ๐‘— = 1,2, โ€ฆ , lg ๐‘ข and ๐‘˜ = 1,2, โ€ฆ , ๐‘ข/2๐‘— define ๐ป๐‘—

๐‘˜ = ๐ป2๐‘—โˆ’1 ๐‘˜โˆ’1 โˆช ๐ป2๐‘— ๐‘˜โˆ’1

For each ๐ป๐‘—

๐‘˜ define a weighted subgraph ๐ผ๐‘— ๐‘˜ :

  • ๐ผ๐‘—

0 = ๐ป๐‘—

  • ๐ผ๐‘—

๐‘˜ = ALG(๐ผ2๐‘—โˆ’1 ๐‘˜โˆ’1 โˆช ๐ผ2๐‘— ๐‘˜โˆ’1), ๐‘˜ > 0

By the mergeable and composable properties ๐ผ1

lg ๐‘ข is a (1 + ๐›ฟ)lg ๐‘ข sparsifier of ๐ป

slide-38
SLIDE 38

Streaming Graph Algorithms

Spectral Sparsification โ€“ Construction in the semi-streaming model By the mergeable and composable properties ๐ผ1

lg ๐‘ข is a (1 + ๐›ฟ)lg ๐‘ข sparsifier of ๐ป

Set ๐›ฟ = ๐œ/(2 lg ๐‘ข) โ‡’ (1 + ๐›ฟ)lg ๐‘ข ~ (1 + ๐œ) Then ๐ผ1

lg ๐‘ข is a (1 + ๐œ) sparsifier of ๐ป

slide-39
SLIDE 39

Streaming Graph Algorithms

Spectral Sparsification โ€“ Construction in the semi-streaming model By the mergeable and composable properties ๐ผ1

lg ๐‘ข is a (1 + ๐›ฟ)lg ๐‘ข sparsifier of ๐ป

Set ๐›ฟ = ๐œ/(2 lg ๐‘ข) โ‡’ (1 + ๐›ฟ)lg ๐‘ข ~ (1 + ๐œ) Then ๐ผ1

lg ๐‘ข is a (1 + ๐œ) sparsifier of ๐ป

Space required ๐ผ๐‘—

๐‘˜ = ALG ๐ผ2๐‘—โˆ’1 ๐‘˜โˆ’1 โˆช ๐ผ2๐‘— ๐‘˜โˆ’1

๐ผ2๐‘—โˆ’1

๐‘˜โˆ’1

๐ผ2๐‘—

๐‘˜โˆ’1

Delete ๐ผ2๐‘—โˆ’1

๐‘˜โˆ’1 and ๐ผ2๐‘— ๐‘˜โˆ’1

as soon as ๐ผ๐‘—

๐‘˜ is computed

โ‡’ For each ๐‘˜ we need to store ๐ผ๐‘—

๐‘˜

  • nly for two values of ๐‘—
slide-40
SLIDE 40

Streaming Graph Algorithms

Spectral Sparsification โ€“ Construction in the semi-streaming model By the mergeable and composable properties ๐ผ1

lg ๐‘ข is a (1 + ๐›ฟ)lg ๐‘ข sparsifier of ๐ป

Set ๐›ฟ = ๐œ/(2 lg ๐‘ข) โ‡’ (1 + ๐›ฟ)lg ๐‘ข ~ (1 + ๐œ) Then ๐ผ1

lg ๐‘ข is a (1 + ๐œ) sparsifier of ๐ป

Space required ๐ผ๐‘—

๐‘˜ = ALG ๐ผ2๐‘—โˆ’1 ๐‘˜โˆ’1 โˆช ๐ผ2๐‘— ๐‘˜โˆ’1

๐ผ2๐‘—โˆ’1

๐‘˜โˆ’1

๐ผ2๐‘—

๐‘˜โˆ’1

Delete ๐ผ2๐‘—โˆ’1

๐‘˜โˆ’1 and ๐ผ2๐‘— ๐‘˜โˆ’1

as soon as ๐ผ๐‘—

๐‘˜ is computed

โ‡’ For each ๐‘˜ we need to store ๐ผ๐‘—

๐‘˜

  • nly for two values of ๐‘—

So at any given time we need to store โ‰ค 2 โˆ™ ๐‘ก๐‘—๐‘จ๐‘“ ๐›ฟ โˆ™ lg ๐‘ข = O(๐‘œ lg3๐‘œ/๐œ2)

slide-41
SLIDE 41

Streaming Graph Algorithms

Matchings Graph ๐ป = (๐‘Š, ๐น) Goal: Find a maximum cardinality matching ๐‘โˆ— Matching: Subset of edges ๐‘ โІ ๐น such that each vertex is adjacent to at most one edge in ๐‘

slide-42
SLIDE 42

Streaming Graph Algorithms

Matchings Graph ๐ป = (๐‘Š, ๐น) Goal: Find a maximum cardinality matching ๐‘โˆ— Matching: Subset of edges ๐‘ โІ ๐น such that each vertex is adjacent to at most one edge in ๐‘

slide-43
SLIDE 43

Streaming Graph Algorithms

Matchings Graph ๐ป = (๐‘Š, ๐น) Goal: Find a maximum cardinality matching ๐‘โˆ— Greedy Matching Algorithm 1. ๐‘ โ† โˆ… 2. for

  • r each edge ๐‘“ โˆˆ ๐‘‡ do

do 3. if if ๐‘ โˆช {๐‘“} is a matching the then add ๐‘“ to ๐‘ 4. ret eturn ๐‘ Matching: Subset of edges ๐‘ โІ ๐น such that each vertex is adjacent to at most one edge in ๐‘

slide-44
SLIDE 44

Streaming Graph Algorithms

Matchings Graph ๐ป = (๐‘Š, ๐น) Goal: Find a maximum cardinality matching ๐‘โˆ— The Greedy Matching Algorithm computes a matching ๐‘ with cardinality ๐‘ โ‰ฅ ๐‘โˆ— /2 Matching: Subset of edges ๐‘ โІ ๐น such that each vertex is adjacent to at most one edge in ๐‘

slide-45
SLIDE 45

Streaming Graph Algorithms

Matchings Graph ๐ป = (๐‘Š, ๐น) Matching: Subset of edges ๐‘ โІ ๐น such that each vertex is adjacent to at most one edge in ๐‘ Goal: Find a maximum cardinality matching ๐‘โˆ— The Greedy Matching Algorithm computes a matching ๐‘ with cardinality ๐‘ โ‰ฅ ๐‘โˆ— /2 ๐‘ฃ ๐‘ค โˆˆ ๐‘โˆ— Consider an edge (๐‘ฃ, ๐‘ค) โˆˆ ๐‘โˆ— If (๐‘ฃ, ๐‘ค) โˆ‰ ๐‘ then ๐‘ must contain at least one edge ๐‘“ adjacent to ๐‘ฃ or to ๐‘ค ๐‘“ is adjacent to at most 2 edges of ๐‘โˆ— ๐‘ฃโ€ฒ ๐‘คโ€ฒ โˆˆ ๐‘โˆ— โˆˆ ๐‘ ๐‘“

slide-46
SLIDE 46

Streaming Graph Algorithms

Weighted Matchings Weighted graph ๐ป = (๐‘Š, ๐น, ๐‘ฅ). Edge weights ๐‘ฅ โˆถ ๐น โ†’ โ„+ (๐‘ฅ(๐‘“) > 0, โˆ€๐‘“ โˆˆ ๐น) Goal: Find a maximum weight matching ๐‘โˆ— As before, we process the edges of the stream ๐‘‡ as they arrive and try to augment the current matching ๐‘

slide-47
SLIDE 47

Streaming Graph Algorithms

Weighted Matchings Weighted graph ๐ป = (๐‘Š, ๐น, ๐‘ฅ). Edge weights ๐‘ฅ โˆถ ๐น โ†’ โ„+ (๐‘ฅ(๐‘“) > 0, โˆ€๐‘“ โˆˆ ๐น) Goal: Find a maximum weight matching ๐‘โˆ— As before, we process the edges of the stream ๐‘‡ as they arrive and try to augment the current matching ๐‘ Let ๐‘“ be the next edge read from ๐‘‡. Let ๐ท be the edges of ๐‘ that are in conflict with ๐‘“ : and edge in ๐ท and ๐‘“ are adjacent to a common vertex.

slide-48
SLIDE 48

Streaming Graph Algorithms

Weighted Matchings Weighted graph ๐ป = (๐‘Š, ๐น, ๐‘ฅ). Edge weights ๐‘ฅ โˆถ ๐น โ†’ โ„+ (๐‘ฅ(๐‘“) > 0, โˆ€๐‘“ โˆˆ ๐น) Goal: Find a maximum weight matching ๐‘โˆ— As before, we process the edges of the stream ๐‘‡ as they arrive and try to augment the current matching ๐‘ Let ๐‘“ be the next edge read from ๐‘‡. Let ๐ท be the edges of ๐‘ that are in conflict with ๐‘“ : and edge in ๐ท and ๐‘“ are adjacent to a common vertex. โˆˆ ๐‘ โˆˆ ๐‘ ๐‘“ ๐ท has at most two edges. Let ๐‘ฅ(๐ท) be the total weight of the edges in ๐ท. If ๐‘ฅ(๐‘“) > ๐‘ฅ(๐ท) then we increase the weight of ๐‘ by including ๐‘“ and deleting the edges of ๐ท.

slide-49
SLIDE 49

Streaming Graph Algorithms

Weighted Matchings Let ๐‘“ be the next edge read from ๐‘‡. Let ๐ท be the edges of ๐‘ that are in conflict with ๐‘“ : and edge in ๐ท and ๐‘“ are adjacent to a common vertex. โˆˆ ๐‘ โˆˆ ๐‘ ๐‘“ If ๐‘ฅ(๐‘“) > ๐‘ฅ(๐ท) then we increase the weight of ๐‘ by including ๐‘“ and deleting the edges of ๐ท. ๐‘ฅ(๐ท) = total weight of the edges in ๐ท. Greedy Weighted Matching Algorithm 1. ๐‘ โ† โˆ… 2. for

  • r each edge ๐‘“ โˆˆ ๐‘‡ do

do 3. let ๐ท be the set of edges that are in conflict with ๐‘“ 4. if if ๐‘ฅ ๐‘“ > ๐‘ฅ(๐ท) th then add ๐‘“ to ๐‘ and delete ๐ท from ๐‘ 5. ret eturn ๐‘

slide-50
SLIDE 50

Streaming Graph Algorithms

Weighted Matchings Consider the following scenario ๐‘‡ = (1,2), (2,3), (3,4), โ€ฆ , (๐‘œ, ๐‘œ โˆ’ 1) Edge ๐‘“๐‘— = (๐‘—, ๐‘— + 1) has weight ๐‘ฅ(๐‘“๐‘—) = 1 + ๐‘—๐œ, for a small ๐œ > 0 1 + ๐œ

2 1 4 3 5 6

1 + 2๐œ 1 + 3๐œ 1 + 4๐œ 1 + 5๐œ ๐‘ = {}

slide-51
SLIDE 51

Streaming Graph Algorithms

Weighted Matchings Consider the following scenario ๐‘‡ = (1,2), (2,3), (3,4), โ€ฆ , (๐‘œ, ๐‘œ โˆ’ 1) Edge ๐‘“๐‘— = (๐‘—, ๐‘— + 1) has weight ๐‘ฅ(๐‘“๐‘—) = 1 + ๐‘—๐œ, for a small ๐œ > 0 ๐‘ = {(1,2)} 1 + ๐œ

2 1 4 3 5 6

1 + 2๐œ 1 + 3๐œ 1 + 4๐œ 1 + 5๐œ

slide-52
SLIDE 52

Streaming Graph Algorithms

Weighted Matchings Consider the following scenario ๐‘‡ = (1,2), (2,3), (3,4), โ€ฆ , (๐‘œ, ๐‘œ โˆ’ 1) Edge ๐‘“๐‘— = (๐‘—, ๐‘— + 1) has weight ๐‘ฅ(๐‘“๐‘—) = 1 + ๐‘—๐œ, for a small ๐œ > 0 ๐‘ = {(1,2)} 1 + ๐œ

2 1 4 3 5 6

1 + 2๐œ 1 + 3๐œ 1 + 4๐œ 1 + 5๐œ

slide-53
SLIDE 53

Streaming Graph Algorithms

Weighted Matchings Consider the following scenario ๐‘‡ = (1,2), (2,3), (3,4), โ€ฆ , (๐‘œ, ๐‘œ โˆ’ 1) Edge ๐‘“๐‘— = (๐‘—, ๐‘— + 1) has weight ๐‘ฅ(๐‘“๐‘—) = 1 + ๐‘—๐œ, for a small ๐œ > 0 ๐‘ = {(2,3)} 1 + ๐œ

2 1 4 3 5 6

1 + 2๐œ 1 + 3๐œ 1 + 4๐œ 1 + 5๐œ

slide-54
SLIDE 54

Streaming Graph Algorithms

Weighted Matchings Consider the following scenario ๐‘‡ = (1,2), (2,3), (3,4), โ€ฆ , (๐‘œ, ๐‘œ โˆ’ 1) Edge ๐‘“๐‘— = (๐‘—, ๐‘— + 1) has weight ๐‘ฅ(๐‘“๐‘—) = 1 + ๐‘—๐œ, for a small ๐œ > 0 ๐‘ = {(2,3)} 1 + ๐œ

2 1 4 3 5 6

1 + 2๐œ 1 + 3๐œ 1 + 4๐œ 1 + 5๐œ

slide-55
SLIDE 55

Streaming Graph Algorithms

Weighted Matchings Consider the following scenario ๐‘‡ = (1,2), (2,3), (3,4), โ€ฆ , (๐‘œ, ๐‘œ โˆ’ 1) Edge ๐‘“๐‘— = (๐‘—, ๐‘— + 1) has weight ๐‘ฅ(๐‘“๐‘—) = 1 + ๐‘—๐œ, for a small ๐œ > 0 ๐‘ = {(3,4)} 1 + ๐œ

2 1 4 3 5 6

1 + 2๐œ 1 + 3๐œ 1 + 4๐œ 1 + 5๐œ

slide-56
SLIDE 56

Streaming Graph Algorithms

Weighted Matchings Consider the following scenario ๐‘‡ = (1,2), (2,3), (3,4), โ€ฆ , (๐‘œ, ๐‘œ โˆ’ 1) Edge ๐‘“๐‘— = (๐‘—, ๐‘— + 1) has weight ๐‘ฅ(๐‘“๐‘—) = 1 + ๐‘—๐œ, for a small ๐œ > 0 ๐‘ = {(3,4)} 1 + ๐œ

2 1 4 3 5 6

1 + 2๐œ 1 + 3๐œ 1 + 4๐œ 1 + 5๐œ

slide-57
SLIDE 57

Streaming Graph Algorithms

Weighted Matchings Consider the following scenario ๐‘‡ = (1,2), (2,3), (3,4), โ€ฆ , (๐‘œ, ๐‘œ โˆ’ 1) Edge ๐‘“๐‘— = (๐‘—, ๐‘— + 1) has weight ๐‘ฅ(๐‘“๐‘—) = 1 + ๐‘—๐œ, for a small ๐œ > 0 ๐‘ = {(3,4)} 1 + ๐œ

2 1 4 3 5 6

1 + 2๐œ 1 + 3๐œ 1 + 4๐œ 1 + 5๐œ

slide-58
SLIDE 58

Streaming Graph Algorithms

Weighted Matchings Consider the following scenario ๐‘‡ = (1,2), (2,3), (3,4), โ€ฆ , (๐‘œ, ๐‘œ โˆ’ 1) Edge ๐‘“๐‘— = (๐‘—, ๐‘— + 1) has weight ๐‘ฅ(๐‘“๐‘—) = 1 + ๐‘—๐œ, for a small ๐œ > 0 ๐‘ = {(4,5)} 1 + ๐œ

2 1 4 3 5 6

1 + 2๐œ 1 + 3๐œ 1 + 4๐œ 1 + 5๐œ

slide-59
SLIDE 59

Streaming Graph Algorithms

Weighted Matchings Consider the following scenario ๐‘‡ = (1,2), (2,3), (3,4), โ€ฆ , (๐‘œ, ๐‘œ โˆ’ 1) Edge ๐‘“๐‘— = (๐‘—, ๐‘— + 1) has weight ๐‘ฅ(๐‘“๐‘—) = 1 + ๐‘—๐œ, for a small ๐œ > 0 ๐‘ = {(4,5)} 1 + ๐œ

2 1 4 3 5 6

1 + 2๐œ 1 + 3๐œ 1 + 4๐œ 1 + 5๐œ

slide-60
SLIDE 60

Streaming Graph Algorithms

Weighted Matchings Consider the following scenario ๐‘‡ = (1,2), (2,3), (3,4), โ€ฆ , (๐‘œ, ๐‘œ โˆ’ 1) Edge ๐‘“๐‘— = (๐‘—, ๐‘— + 1) has weight ๐‘ฅ(๐‘“๐‘—) = 1 + ๐‘—๐œ, for a small ๐œ > 0 ๐‘ = {(5,6)} 1 + ๐œ

2 1 4 3 5 6

1 + 2๐œ 1 + 3๐œ 1 + 4๐œ 1 + 5๐œ ๐‘ฅ(๐‘) = 1 + 5๐œ

slide-61
SLIDE 61

Streaming Graph Algorithms

Weighted Matchings Consider the following scenario ๐‘‡ = (1,2), (2,3), (3,4), โ€ฆ , (๐‘œ, ๐‘œ โˆ’ 1) Edge ๐‘“๐‘— = (๐‘—, ๐‘— + 1) has weight ๐‘ฅ(๐‘“๐‘—) = 1 + ๐‘—๐œ, for a small ๐œ > 0 ๐‘ = {(5,6)} 1 + ๐œ

2 1 4 3 5 6

1 + 2๐œ 1 + 3๐œ 1 + 4๐œ 1 + 5๐œ ๐‘ฅ(๐‘) = 1 + 5๐œ ๐‘โˆ— = { 1,2 , 3,4 , (5,6)} 1 + ๐œ

2 1 4 3 5 6

1 + 2๐œ 1 + 3๐œ 1 + 4๐œ 1 + 5๐œ ๐‘ฅ(๐‘โˆ—) = 3 + 9๐œ

slide-62
SLIDE 62

Streaming Graph Algorithms

Weighted Matchings Consider the following scenario ๐‘‡ = (1,2), (2,3), (3,4), โ€ฆ , (๐‘œ, ๐‘œ โˆ’ 1) Edge ๐‘“๐‘— = (๐‘—, ๐‘— + 1) has weight ๐‘ฅ(๐‘“๐‘—) = 1 + ๐‘—๐œ, for a small ๐œ > 0 The computed matching ๐‘ has weight ๐‘ฅ(๐‘) = 1 + (๐‘œ โˆ’ 1)๐œ The optimal matching ๐‘ has weight ๐‘ฅ(๐‘โˆ—) = ฯƒ๐‘— 1 + 2๐‘— โˆ’ 1 ๐œ > (๐‘œ โˆ’ 1)/2 Hence, the approximation ratio is ๐‘ฅ(๐‘โˆ—) ๐‘ฅ(๐‘) > (๐‘œ โˆ’ 1)/2 1 + ๐‘œ โˆ’ 1 ๐œ ~ ๐‘œ 2

slide-63
SLIDE 63

Streaming Graph Algorithms

Weighted Matchings The problem is that the trailing edges of ๐‘‡ that were once inserted into ๐‘ but removed later may have much larger total weight than the edges added later. ๐‘ = {(5,6)} 1 + ๐œ

2 1 4 3 5 6

1 + 2๐œ 1 + 3๐œ 1 + 4๐œ 1 + 5๐œ ๐‘ฅ(๐‘) = 1 + 5๐œ trailing edges

slide-64
SLIDE 64

Streaming Graph Algorithms

Weighted Matchings โˆˆ ๐‘ โˆˆ ๐‘ ๐‘“ We include ๐‘“ in ๐‘ If ๐‘ฅ ๐‘“ > ๐›พ๐‘ฅ(๐ท) for some constant ๐›พ = 1 + ๐›ฟ > 1. Modified algorithm Greedy Weighted Matching Algorithm 1. ๐‘ โ† โˆ… 2. for

  • r each edge ๐‘“ โˆˆ ๐‘‡ do

do 3. let ๐ท be the set of edges that are in conflict with ๐‘“ 4. if if ๐‘ฅ ๐‘“ > (1 + ๐›ฟ) โˆ™ ๐‘ฅ(๐ท) th then add ๐‘“ to ๐‘ and delete ๐ท from ๐‘ 5. ret eturn ๐‘

slide-65
SLIDE 65

Streaming Graph Algorithms

Weighted Matchings The problem is that the trailing edges of ๐‘‡ that were once inserted into ๐‘ but removed later may have much larger total weight than the edges added later. ๐‘ = {(5,6)} 1 + ๐œ

2 1 4 3 5 6

1 + 2๐œ 1 + 3๐œ 1 + 4๐œ 1 + 5๐œ ๐‘ฅ(๐‘) = 1 + 5๐œ trailing edges We include ๐‘“ in ๐‘ If ๐‘ฅ ๐‘“ > ๐›พ๐‘ฅ(๐ท) for some constant ๐›พ = 1 + ๐›ฟ > 1. For an edge ๐‘“ define

  • ๐ท0 = {๐‘“}
  • ๐ท๐‘— = edges removed when an edge in ๐ท๐‘—โˆ’1 was added to ๐‘
  • ๐‘ˆ

๐‘“ = ๐ท1 โˆช ๐ท2 โˆช โ‹ฏ

Then ๐‘ฅ(๐‘ˆ

๐‘“) โ‰ค ๐‘ฅ(๐‘“)/๐›ฟ

slide-66
SLIDE 66

Streaming Graph Algorithms

Weighted Matchings It can be shown that ๐‘ฅ(๐‘โˆ—) โ‰ค (1 + ๐›ฟ) โˆ™ เท

๐‘“โˆˆ๐‘

(๐‘ฅ ๐‘ˆ

๐‘“ + 2๐‘ฅ(๐‘“))

By applying a careful charging scheme we get ๐‘ฅ(๐‘โˆ—) ๐‘ฅ(๐‘) < 5.828

slide-67
SLIDE 67

Streaming Graph Algorithms

Weighted Matchings Multi-pass Algorithm Greedy Weighted Matching Algorithm ๐‘‡ ๐‘ = โˆ… ๐‘ We can get a (2 + ๐œ)-approximation with O(๐œโˆ’3) passes over ๐‘‡, where ๐›ฟ = O(๐œ)

slide-68
SLIDE 68

Streaming Graph Algorithms

Graph Sketches Random linear projection ๐‘ โˆถ โ„๐‘œ โ†’ โ„๐‘™, where ๐‘™ โ‰ช ๐‘œ ๐‘ ๐’˜ = ๐‘๐’˜ โˆˆ โ„๐‘œ โˆˆ โ„๐‘™ For any vector ๐’˜ โˆˆ โ„๐‘œ, the projection ๐‘๐’˜ โˆˆ โ„๐‘™ preserves properties of ๐’˜ with high probability Many applications: estimating entropy, heavy hitters, estimating norms, fitting polynomials,โ€ฆ Rich theory: dimensionality reduction, sparse recovery, metric embeddings,โ€ฆ โˆˆ โ„๐‘™ร—๐‘œ

slide-69
SLIDE 69

Streaming Graph Algorithms

Graph Sketches Can we use this approach for graphs? That is, can we project the adjacency matrix ๐ต๐ป of a graph ๐ป to a smaller matrix ๐‘๐ต๐ป, so that we can use ๐‘๐ต๐ป to compute properties of ๐ป?

  • For a graph ๐ป with n vertices, ๐ต๐ป has O ๐‘œ2 dimensions.
  • To work in the semi-streaming model we want ๐‘๐ต๐ป to have O(๐‘œ polylog(๐‘œ))

dimensions.

slide-70
SLIDE 70

Streaming Graph Algorithms

Graph Sketches

Picture from https://people.cs.umass.edu/~mcgregor/711S12/lec-2-2.pdf

slide-71
SLIDE 71

Streaming Graph Algorithms

Graph Sketches Dynamic graph stream ๐‘‡ = ๐‘1, ๐‘2, โ€ฆ where ๐‘๐‘— = (๐‘“๐‘—, ฮ”๐œ…) ๐‘“๐‘— = an edge of the graph ฮ”๐‘— = แ‰ +1, ๐‘“๐‘— is inserted โˆ’1, ๐‘“๐‘— is deleted Multiplicity of edge ๐‘“ :

๐‘”

๐‘“ = เท ๐‘—โˆถ ๐‘“๐‘—=๐‘“

ฮ”๐‘—

For simplicity we will assume that ๐‘”

๐‘“ โˆˆ 0,1 , for all edges e.

slide-72
SLIDE 72

Streaming Graph Algorithms

Graph Sketches Vector of edge multiplicities ๐’ˆ โˆˆ 0,1

๐‘œ 2

Each entry of ๐’ˆ is a multiplicity ๐‘”

๐‘“ of a (potential) edge ๐‘“ of ๐ป (a simple graph with

๐‘œ vertices has up to ๐‘œ

2 edges).

1 2 3 ๐‘“12 ๐‘“13 ๐‘“23

๐’ˆ = ๐‘”

๐‘“12

๐‘”

๐‘“13

๐‘”

๐‘“23

= 1 1

slide-73
SLIDE 73

Streaming Graph Algorithms

Graph Sketches Vector of edge multiplicities ๐’ˆ โˆˆ 0,1

๐‘œ 2

Each entry of ๐’ˆ is a multiplicity ๐‘”

๐‘“ of a (potential) edge ๐‘“ of ๐ป (a simple graph with

๐‘œ vertices has up to ๐‘œ

2 edges).

Index vector of edge ๐‘“ : ๐’‹๐‘“ โˆˆ 0,1

๐‘œ 2 . The only nonzero entry of ๐’‹๐‘“ is the one that

corresponds to edge ๐‘“. 1 2 3 ๐‘“12 ๐‘“13 ๐‘“23

๐’‹๐’‡๐Ÿ‘๐Ÿ’ = ๐‘—๐‘“12 ๐‘—๐‘“13 ๐‘—๐‘“23 = 1

slide-74
SLIDE 74

Streaming Graph Algorithms

Graph Sketches Vector of edge multiplicities ๐’ˆ โˆˆ 0,1

๐‘œ 2

Each entry of ๐’ˆ is a multiplicity ๐‘”

๐‘“ of a (potential) edge ๐‘“ of ๐ป (a simple graph with

๐‘œ vertices has up to ๐‘œ

2 edges).

Sketch of ๐’ˆ : ๐ต(๐’ˆ) โˆˆ โ„๐‘’, ๐‘’ =dimensionality of the sketch When we read the next item ๐‘“, ฮ” from the stream, we can update the sketch as follows:

๐ต ๐’ˆ = ๐ต ๐’ˆ + ฮ” โˆ™ ๐ต(๐’‹๐‘“)

Index vector of edge ๐‘“ : ๐’‹๐‘“ โˆˆ 0,1

๐‘œ 2 . The only nonzero entry of ๐’‹๐‘“ is the one that

corresponds to edge ๐‘“.

slide-75
SLIDE 75

Streaming Graph Algorithms

Homomorphic Sketches Vector of edge multiplicities ๐’ˆ โˆˆ 0,1

๐‘œ 2

Each entry of ๐’ˆ is a multiplicity ๐‘”

๐‘“ of a (potential) edge ๐‘“ of ๐ป (a simple graph with

๐‘œ vertices has up to ๐‘œ

2 edges).

For a vertex ๐‘ค let ๐’ˆ๐’˜ โˆˆ 0,1 ๐‘œโˆ’1 be the restriction of ๐’ˆ to the coordinates that involve ๐‘ค (i.e., the ๐‘œ โˆ’ 1 edges that can be adjacent to ๐‘ค in ๐ป) 1 2 3 ๐‘“12 ๐‘“13 ๐‘“23

๐’ˆ = ๐‘”

๐‘“12

๐‘”

๐‘“13

๐‘”

๐‘“23

= 1 1 ๐’ˆ๐Ÿ = ๐‘”

๐‘“12

๐‘”

๐‘“13

= 1

slide-76
SLIDE 76

Streaming Graph Algorithms

Homomorphic Sketches Vector of edge multiplicities ๐’ˆ โˆˆ 0,1

๐‘œ 2

Each entry of ๐’ˆ is a multiplicity ๐‘”

๐‘“ of a (potential) edge ๐‘“ of ๐ป (a simple graph with

๐‘œ vertices has up to ๐‘œ

2 edges).

For a vertex ๐‘ค let ๐’ˆ๐’˜ โˆˆ 0,1 ๐‘œโˆ’1 be the restriction of ๐’ˆ to the coordinates that involve ๐‘ค (i.e., the ๐‘œ โˆ’ 1 edges that can be adjacent to ๐‘ค in ๐ป)

๐ต ๐’ˆ = ๐ต1 ๐’ˆ๐’˜๐Ÿ โˆ˜ ๐ต2 ๐’ˆ๐’˜๐Ÿ‘ โˆ˜ โ‹ฏ โˆ˜ ๐ต๐‘œ ๐’ˆ๐’˜๐’

The sketches of ๐’ˆ are formed by concatenation (โˆ˜) of the sketches of each ๐’ˆ๐’˜ Homomorphic sketches: For each operation on ๐ป there is a corresponding

  • peration on the sketches
slide-77
SLIDE 77

Streaming Graph Algorithms

Connectivity via Sketches We wish to maintain a spanning forest of a graph ๐ป = (๐‘Š, ๐น) 1 2 3 4 6 7 5

slide-78
SLIDE 78

Streaming Graph Algorithms

Connectivity via Sketches We wish to maintain a spanning forest of a graph ๐ป = (๐‘Š, ๐น) Connectivity Algorithm 1. rep epeat 2. for each vertex ๐‘ค of the current graph do do 3. select an edge incident to ๐‘ค 4. contract all selected edges 5. un until the current graph has no edges Letโ€™s begin with a simple (non-sketch) algorithm

slide-79
SLIDE 79

Streaming Graph Algorithms

Connectivity via Sketches We wish to maintain a spanning forest of a graph ๐ป = (๐‘Š, ๐น) 1 2 3 4 6 7 5

slide-80
SLIDE 80

Streaming Graph Algorithms

Connectivity via Sketches We wish to maintain a spanning forest of a graph ๐ป = (๐‘Š, ๐น) 1 2 3 4 6 7 5 12 34

567

slide-81
SLIDE 81

Streaming Graph Algorithms

Connectivity via Sketches We wish to maintain a spanning forest of a graph ๐ป = (๐‘Š, ๐น) 1 2 3 4 6 7 5 12 34

567

super-vertices

slide-82
SLIDE 82

Streaming Graph Algorithms

Connectivity via Sketches We wish to maintain a spanning forest of a graph ๐ป = (๐‘Š, ๐น) 1 2 3 4 6 7 5 12 34

567

12 34

567

slide-83
SLIDE 83

Streaming Graph Algorithms

Connectivity via Sketches We wish to maintain a spanning forest of a graph ๐ป = (๐‘Š, ๐น) 1 2 3 4 6 7 5 12 34

567

12 34

567

new super-vertices

slide-84
SLIDE 84

Streaming Graph Algorithms

Connectivity via Sketches We wish to maintain a spanning forest of a graph ๐ป = (๐‘Š, ๐น) Connectivity Algorithm 1. rep epeat 2. for each vertex ๐‘ค of the current graph do do 3. select an edge incident to ๐‘ค 4. contract all selected edges 5. un until the current graph has no edges Letโ€™s begin with a simple (non-sketch) algorithm Finds the connected components of ๐ป, and a spanning forest, in O(log ๐‘œ) rounds

slide-85
SLIDE 85

Streaming Graph Algorithms

Connectivity via Sketches To design an algorithm that uses sketches we have to:

  • 1. Define an appropriate graph representation
  • 2. Apply โ„“0-sampling via linear sketches
slide-86
SLIDE 86

Streaming Graph Algorithms

Connectivity via Sketches To design an algorithm that uses sketches we have to:

  • 1. Define an appropriate graph representation
  • 2. Apply โ„“๐Ÿ-sampling via linear sketches

Let ๐ฟ = polylog(๐‘‚). There is a distribution over matrices ๐‘ โˆˆ โ„๐ฟร—๐‘‚ such that for any ๐’š โˆˆ โ„๐‘‚, a random non-zero element of ๐’š can be reconstructed from ๐‘๐’š with high probability. โ„“๐Ÿ-sampling

slide-87
SLIDE 87

Streaming Graph Algorithms

Connectivity via Sketches To design an algorithm that uses sketches we have to:

  • 1. Define an appropriate graph representation

๐’ƒ(๐‘˜,๐‘™)

๐‘—

= แ‰ +1, โˆ’1, 0,

if ๐‘— = ๐‘˜ < ๐‘™ and (๐‘ค๐‘˜, ๐‘ค๐‘™) โˆˆ ๐น if ๐‘˜ < ๐‘™ = ๐‘— and (๐‘ค๐‘˜, ๐‘ค๐‘™) โˆˆ ๐น

  • therwise

For each vertex ๐‘ค๐‘— we define a vector ๐’ƒ๐’‹ โˆˆ โˆ’1,0,1

๐‘œ 2

with entries

slide-88
SLIDE 88

Streaming Graph Algorithms

Connectivity via Sketches To design an algorithm that uses sketches we have to:

  • 1. Define an appropriate graph representation

1 2 3 4 ๐’ƒ๐’‹ = ๐’ƒ 1,2

๐‘—

๐’ƒ 1,3

๐‘—

๐’ƒ(1,4)

๐‘—

๐’ƒ 2,3

๐‘—

๐’ƒ 2,4

๐‘—

๐’ƒ 3,4

๐‘— ๐‘ˆ

Vector of vertex ๐‘— :

slide-89
SLIDE 89

Streaming Graph Algorithms

Connectivity via Sketches To design an algorithm that uses sketches we have to:

  • 1. Define an appropriate graph representation

1 2 3 4 ๐’ƒ๐’‹ = ๐’ƒ 1,2

๐‘—

๐’ƒ 1,3

๐‘—

๐’ƒ(1,4)

๐‘—

๐’ƒ 2,3

๐‘—

๐’ƒ 2,4

๐‘—

๐’ƒ 3,4

๐‘— ๐‘ˆ

Vector of vertex ๐‘— : ๐’ƒ๐Ÿ = 1 1 0 ๐‘ˆ ๐’ƒ๐Ÿ‘ = โˆ’1 1 0 ๐‘ˆ ๐’ƒ๐Ÿ’ = 0 โˆ’1 โˆ’1 1 ๐‘ˆ ๐’ƒ๐Ÿ“ = 0 โˆ’1 ๐‘ˆ

slide-90
SLIDE 90

Streaming Graph Algorithms

Connectivity via Sketches To design an algorithm that uses sketches we have to:

  • 1. Define an appropriate graph representation

1 2 3 4 ๐’ƒ๐’‹ = ๐’ƒ 1,2

๐‘—

๐’ƒ 1,3

๐‘—

๐’ƒ(1,4)

๐‘—

๐’ƒ 2,3

๐‘—

๐’ƒ 2,4

๐‘—

๐’ƒ 3,4

๐‘— ๐‘ˆ

Vector of vertex ๐‘— : ๐’ƒ๐Ÿ = 1 1 0 ๐‘ˆ ๐’ƒ๐Ÿ‘ = โˆ’1 1 0 ๐‘ˆ ๐’ƒ๐Ÿ’ = 0 โˆ’1 โˆ’1 1 ๐‘ˆ ๐’ƒ๐Ÿ“ = 0 โˆ’1 ๐‘ˆ ๐’ƒ๐Ÿ + ๐’ƒ๐Ÿ‘ = 1 1 0 ๐‘ˆ

slide-91
SLIDE 91

Streaming Graph Algorithms

Connectivity via Sketches To design an algorithm that uses sketches we have to:

  • 1. Define an appropriate graph representation

1 2 3 4 ๐’ƒ๐’‹ = ๐’ƒ 1,2

๐‘—

๐’ƒ 1,3

๐‘—

๐’ƒ(1,4)

๐‘—

๐’ƒ 2,3

๐‘—

๐’ƒ 2,4

๐‘—

๐’ƒ 3,4

๐‘— ๐‘ˆ

Vector of vertex ๐‘— : ๐’ƒ๐Ÿ = 1 1 0 ๐‘ˆ ๐’ƒ๐Ÿ‘ = โˆ’1 1 0 ๐‘ˆ ๐’ƒ๐Ÿ’ = 0 โˆ’1 โˆ’1 1 ๐‘ˆ ๐’ƒ๐Ÿ“ = 0 โˆ’1 ๐‘ˆ ๐’ƒ๐Ÿ + ๐’ƒ๐Ÿ‘ = ๐Ÿ ๐Ÿ 0 ๐‘ˆ

slide-92
SLIDE 92

Streaming Graph Algorithms

Connectivity via Sketches To design an algorithm that uses sketches we have to:

  • 1. Define an appropriate graph representation

๐’ƒ(๐‘˜,๐‘™)

๐‘—

= แ‰ +1, โˆ’1, 0,

if ๐‘— = ๐‘˜ < ๐‘™ and (๐‘ค๐‘˜, ๐‘ค๐‘™) โˆˆ ๐น if ๐‘˜ < ๐‘™ = ๐‘— and (๐‘ค๐‘˜, ๐‘ค๐‘™) โˆˆ ๐น

  • therwise

For each vertex ๐‘ค๐‘— we define a vector ๐’ƒ๐’‹ โˆˆ โˆ’1,0,1

๐‘œ 2

with entries For any subset of vertices ๐‘‰ โІ ๐‘Š, let ๐’ƒ ๐‘‰ = เท

๐‘ค๐‘—โˆˆ๐‘‰

๐’ƒ๐’‹

slide-93
SLIDE 93

Streaming Graph Algorithms

Connectivity via Sketches To design an algorithm that uses sketches we have to:

  • 1. Define an appropriate graph representation

๐’ƒ(๐‘˜,๐‘™)

๐‘—

= แ‰ +1, โˆ’1, 0,

if ๐‘— = ๐‘˜ < ๐‘™ and (๐‘ค๐‘˜, ๐‘ค๐‘™) โˆˆ ๐น if ๐‘˜ < ๐‘™ = ๐‘— and (๐‘ค๐‘˜, ๐‘ค๐‘™) โˆˆ ๐น

  • therwise

For each vertex ๐‘ค๐‘— we define a vector ๐’ƒ๐’‹ โˆˆ โˆ’1,0,1

๐‘œ 2

with entries For any subset of vertices ๐‘‰ โІ ๐‘Š, let ๐’ƒ ๐‘‰ = เท

๐‘ค๐‘—โˆˆ๐‘‰

๐’ƒ๐’‹

The non-zero entries of ๐’ƒ(๐‘‰) correspond to ๐œ€๐ป ๐‘‰ = the set of edges of ๐ป that cross the cut (๐‘‰, ๐‘Š\U)

slide-94
SLIDE 94

Streaming Graph Algorithms

Connectivity via Sketches To design an algorithm that uses sketches we have to:

  • 1. Define an appropriate graph representation

For any subset of vertices ๐‘‰ โІ ๐‘Š, let ๐’ƒ ๐‘‰ = เท

๐‘ค๐‘—โˆˆ๐‘‰

๐’ƒ๐’‹

The non-zero entries of ๐’ƒ(๐‘‰) correspond to ๐œ€๐ป ๐‘‰ = the set of edges of ๐ป that cross the cut (๐‘‰, ๐‘Š\U)

slide-95
SLIDE 95

Streaming Graph Algorithms

Connectivity via Sketches To design an algorithm that uses sketches we have to:

  • 1. Define an appropriate graph representation

For any subset of vertices ๐‘‰ โІ ๐‘Š, let ๐’ƒ ๐‘‰ = เท

๐‘ค๐‘—โˆˆ๐‘‰

๐’ƒ๐’‹

The non-zero entries of ๐’ƒ(๐‘‰) correspond to ๐œ€๐ป ๐‘‰ = the set of edges of ๐ป that cross the cut (๐‘‰, ๐‘Š\U) Thus ฯƒ๐‘ค๐‘—โˆˆ๐‘‰ ๐‘๐’ƒ๐’‹ = ๐‘ ฯƒ๐‘ค๐‘—โˆˆ๐‘‰ ๐’ƒ๐’‹ gives a random edge in ๐œ€๐ป ๐‘‰

slide-96
SLIDE 96

Streaming Graph Algorithms

Connectivity via Sketches Connectivity via Sketches Algorithm I: Compute the Sketches in a Single Pass 1. Choose ๐‘ข = O(log ๐‘œ) 2. for

  • r ๐‘— = 1,2, โ€ฆ , ๐‘œ and ๐‘˜ = 1,2, โ€ฆ , ๐‘ข do

do 3. Construct the random projection ๐‘

๐‘˜๐’ƒ๐‘—

4. for

  • r ๐‘— = 1,2, โ€ฆ , ๐‘œ do

do 5. Compute ๐ต๐‘— ๐’ˆ๐’˜๐’‹ = (๐‘1๐’ƒ๐‘—) โˆ˜ (๐‘2๐’ƒ๐‘—) โˆ˜ โ‹ฏ โˆ˜ (๐‘๐‘ข๐’ƒ๐‘—)

slide-97
SLIDE 97

Streaming Graph Algorithms

Connectivity via Sketches Connectivity via Sketches Algorithm I: Compute the Sketches in a Single Pass 1. Choose ๐‘ข = O(log ๐‘œ) 2. for

  • r ๐‘— = 1,2, โ€ฆ , ๐‘œ and ๐‘˜ = 1,2, โ€ฆ , ๐‘ข do

do 3. Construct the random projection ๐‘

๐‘˜๐’ƒ๐‘—

4. for

  • r ๐‘— = 1,2, โ€ฆ , ๐‘œ do

do 5. Compute ๐ต๐‘— ๐’ˆ๐’˜๐’‹ = (๐‘1๐’ƒ๐‘—) โˆ˜ (๐‘2๐’ƒ๐‘—) โˆ˜ โ‹ฏ โˆ˜ (๐‘๐‘ข๐’ƒ๐‘—)

  • Each sketch ๐ต๐‘— has dimension O(polylog๐‘œ)
  • Since there are n sketches, the required space is O(๐‘œ polylog๐‘œ)
slide-98
SLIDE 98

Streaming Graph Algorithms

Connectivity via Sketches Connectivity via Sketches Algorithm II: Emulate Connectivity Algorithm 1. Let เท  ๐‘Š = ๐‘Š be the initial set of super-vertices 2. for

  • r ๐‘— = 1,2, โ€ฆ , ๐‘ข do

do 3. for

  • r each super-vertex ๐‘‰ โˆˆ เท 

๐‘Š do do 4. use ฯƒ๐‘ค๐‘—โˆˆ๐‘‰ ๐‘๐’ƒ๐’‹ to sample an edge between ๐‘‰ and another super-vertex ๐‘‹ 5. collapse ๐‘‰ and ๐‘‹ to form a new super-vertex

slide-99
SLIDE 99

Streaming Graph Algorithms

Connectivity via Sketches Connectivity via Sketches Algorithm II: Emulate Connectivity Algorithm 1. Let เท  ๐‘Š = ๐‘Š be the initial set of super-vertices 2. for

  • r ๐‘— = 1,2, โ€ฆ , ๐‘ข do

do 3. for

  • r each super-vertex ๐‘‰ โˆˆ เท 

๐‘Š do do 4. use ฯƒ๐‘ค๐‘—โˆˆ๐‘‰ ๐‘๐’ƒ๐’‹ to sample an edge between ๐‘‰ and another super-vertex ๐‘‹ 5. collapse ๐‘‰ and ๐‘‹ to form a new super-vertex The update time (to process the next edge in ๐‘‡) is O(polylog๐‘œ)

slide-100
SLIDE 100

Streaming Graph Algorithms

Concluding remarks

  • Many graph algorithms in the data stream model are known for

basic problems. E.g., estimating connectivity, approximating distances, finding approximate matchings, counting subgraphs,โ€ฆ

  • But limited work on directed graphs!
  • Space constraints: semi-stream model not suited for sparse

graphs (๐‘› = O(๐‘œ polylog๐‘œ))

slide-101
SLIDE 101

Streaming Architectures

Picture from https://databricks.com/blog/2015/07/30/diving-into-spark-streamings-execution-model.html

slide-102
SLIDE 102

Streaming Architectures

Google Cloud Platform

https://cloud.google.com/solutions/architecture/streamprocessing