data streams communication complexity
play

Data Streams & Communication Complexity Lecture 2: Graph - PowerPoint PPT Presentation

Data Streams & Communication Complexity Lecture 2: Graph Spanners, Sparsifiers, & Sketches Andrew McGregor, UMass Amherst 1/25 Graph Streams Consider a stream of m edges e 1 , e 2 , . . . . . . , e m defining a graph G with


  1. Data Streams & Communication Complexity Lecture 2: Graph Spanners, Sparsifiers, & Sketches Andrew McGregor, UMass Amherst 1/25

  2. Graph Streams ◮ Consider a stream of m edges � e 1 , e 2 , . . . . . . , e m � defining a graph G with nodes V = [ n ] and E = { e 1 , . . . , e m } 2/25

  3. Graph Streams ◮ Consider a stream of m edges � e 1 , e 2 , . . . . . . , e m � defining a graph G with nodes V = [ n ] and E = { e 1 , . . . , e m } ◮ Semi-streaming: What can we compute with O ( n · polylog n ) space? 2/25

  4. Outline Spanners and Distances Sparsifiers and Cuts Sketches and Dynamic Graphs Connectivity k -Connectivity Minimum Cut 3/25

  5. Outline Spanners and Distances Sparsifiers and Cuts Sketches and Dynamic Graphs Connectivity k -Connectivity Minimum Cut 4/25

  6. Graph Distances ◮ Goal: Approximate length of the shortest path d G ( u , v ) between a pair of nodes u , v ∈ G , 5/25

  7. Graph Distances ◮ Goal: Approximate length of the shortest path d G ( u , v ) between a pair of nodes u , v ∈ G , Definition An α -spanner of graph G is a subgraph H such that for any nodes u , v , d G ( u , v ) ≤ d H ( u , v ) ≤ α d G ( u , v ) . 5/25

  8. Warm-Up: Connectivity ◮ Goal: Compute the number of connected components. 6/25

  9. Warm-Up: Connectivity ◮ Goal: Compute the number of connected components. ◮ Algorithm: Maintain a spanning forest F 6/25

  10. Warm-Up: Connectivity ◮ Goal: Compute the number of connected components. ◮ Algorithm: Maintain a spanning forest F ◮ F ← ∅ 6/25

  11. Warm-Up: Connectivity ◮ Goal: Compute the number of connected components. ◮ Algorithm: Maintain a spanning forest F ◮ F ← ∅ ◮ For each edge ( u , v ), if u and v aren’t connected in F , F ← F ∪ { ( u , v ) } 6/25

  12. Warm-Up: Connectivity ◮ Goal: Compute the number of connected components. ◮ Algorithm: Maintain a spanning forest F ◮ F ← ∅ ◮ For each edge ( u , v ), if u and v aren’t connected in F , F ← F ∪ { ( u , v ) } ◮ Analysis: 6/25

  13. Warm-Up: Connectivity ◮ Goal: Compute the number of connected components. ◮ Algorithm: Maintain a spanning forest F ◮ F ← ∅ ◮ For each edge ( u , v ), if u and v aren’t connected in F , F ← F ∪ { ( u , v ) } ◮ Analysis: ◮ F has the same number of connected components as G 6/25

  14. Warm-Up: Connectivity ◮ Goal: Compute the number of connected components. ◮ Algorithm: Maintain a spanning forest F ◮ F ← ∅ ◮ For each edge ( u , v ), if u and v aren’t connected in F , F ← F ∪ { ( u , v ) } ◮ Analysis: ◮ F has the same number of connected components as G ◮ F has at most n − 1 edges. 6/25

  15. Warm-Up: Connectivity ◮ Goal: Compute the number of connected components. ◮ Algorithm: Maintain a spanning forest F ◮ F ← ∅ ◮ For each edge ( u , v ), if u and v aren’t connected in F , F ← F ∪ { ( u , v ) } ◮ Analysis: ◮ F has the same number of connected components as G ◮ F has at most n − 1 edges. ◮ Thm: Can count connected components in O ( n log n ) space. 6/25

  16. Spanners ◮ Algorithm: 7/25

  17. Spanners ◮ Algorithm: ◮ H ← ∅ . 7/25

  18. Spanners ◮ Algorithm: ◮ H ← ∅ . ◮ For each edge ( u , v ), if d H ( u , v ) ≥ 2 t , H ← H ∪ { ( u , v ) } 7/25

  19. Spanners ◮ Algorithm: ◮ H ← ∅ . ◮ For each edge ( u , v ), if d H ( u , v ) ≥ 2 t , H ← H ∪ { ( u , v ) } ◮ Analysis: 7/25

  20. Spanners ◮ Algorithm: ◮ H ← ∅ . ◮ For each edge ( u , v ), if d H ( u , v ) ≥ 2 t , H ← H ∪ { ( u , v ) } ◮ Analysis: ◮ Distances increase by at most a factor 2 t − 1 since an edge ( u , v ) is only forgotten if there’s already a detour of length at most 2 t − 1. 7/25

  21. Spanners ◮ Algorithm: ◮ H ← ∅ . ◮ For each edge ( u , v ), if d H ( u , v ) ≥ 2 t , H ← H ∪ { ( u , v ) } ◮ Analysis: ◮ Distances increase by at most a factor 2 t − 1 since an edge ( u , v ) is only forgotten if there’s already a detour of length at most 2 t − 1. ◮ Lemma: H has O ( n 1+1 / t ) edges since all cycles have length ≥ 2 t + 1. 7/25

  22. Spanners ◮ Algorithm: ◮ H ← ∅ . ◮ For each edge ( u , v ), if d H ( u , v ) ≥ 2 t , H ← H ∪ { ( u , v ) } ◮ Analysis: ◮ Distances increase by at most a factor 2 t − 1 since an edge ( u , v ) is only forgotten if there’s already a detour of length at most 2 t − 1. ◮ Lemma: H has O ( n 1+1 / t ) edges since all cycles have length ≥ 2 t + 1. Theorem Can (2 t − 1) -approximate all distances using only O ( n 1+1 / t ) space. 7/25

  23. Proof of Lemma Lemma A graph H on n nodes with no cycles of length ≤ 2 t has O ( n 1+1 / t ) edges. 8/25

  24. Proof of Lemma Lemma A graph H on n nodes with no cycles of length ≤ 2 t has O ( n 1+1 / t ) edges. ◮ Let d = 2 m / n be average degree of H . 8/25

  25. Proof of Lemma Lemma A graph H on n nodes with no cycles of length ≤ 2 t has O ( n 1+1 / t ) edges. ◮ Let d = 2 m / n be average degree of H . ◮ Let J be the graph formed by removing all nodes with degree less than d / 2. 8/25

  26. Proof of Lemma Lemma A graph H on n nodes with no cycles of length ≤ 2 t has O ( n 1+1 / t ) edges. ◮ Let d = 2 m / n be average degree of H . ◮ Let J be the graph formed by removing all nodes with degree less than d / 2. Note J � = ∅ because < n ( d / 2) = m edges are removed. 8/25

  27. Proof of Lemma Lemma A graph H on n nodes with no cycles of length ≤ 2 t has O ( n 1+1 / t ) edges. ◮ Let d = 2 m / n be average degree of H . ◮ Let J be the graph formed by removing all nodes with degree less than d / 2. Note J � = ∅ because < n ( d / 2) = m edges are removed. ◮ Grow a BFS of depth t from an arbitrary node in J . 8/25

  28. Proof of Lemma Lemma A graph H on n nodes with no cycles of length ≤ 2 t has O ( n 1+1 / t ) edges. ◮ Let d = 2 m / n be average degree of H . ◮ Let J be the graph formed by removing all nodes with degree less than d / 2. Note J � = ∅ because < n ( d / 2) = m edges are removed. ◮ Grow a BFS of depth t from an arbitrary node in J . ◮ Because a) no cycles of length less than 2 t + 1 and b) all degrees in J are at least d / 2, number of nodes at t -th level of BFS is at least ( d / 2 − 1) t = ( m / n − 1) t 8/25

  29. Proof of Lemma Lemma A graph H on n nodes with no cycles of length ≤ 2 t has O ( n 1+1 / t ) edges. ◮ Let d = 2 m / n be average degree of H . ◮ Let J be the graph formed by removing all nodes with degree less than d / 2. Note J � = ∅ because < n ( d / 2) = m edges are removed. ◮ Grow a BFS of depth t from an arbitrary node in J . ◮ Because a) no cycles of length less than 2 t + 1 and b) all degrees in J are at least d / 2, number of nodes at t -th level of BFS is at least ( d / 2 − 1) t = ( m / n − 1) t ◮ But ( m / n − 1) t ≤ | J | ≤ n and therefore m ≤ n + n 1+1 / t . 8/25

  30. Outline Spanners and Distances Sparsifiers and Cuts Sketches and Dynamic Graphs Connectivity k -Connectivity Minimum Cut 9/25

  31. Cuts and Sparsifiers ◮ Goal: Approximate capacity C G ( S ) of any cut ( S , V \ S ) in G . 10/25

  32. Cuts and Sparsifiers ◮ Goal: Approximate capacity C G ( S ) of any cut ( S , V \ S ) in G . Definition An α -sparsifier of graph G is a weighted subgraph H such that for any cut ( S , V \ S ), C G ( S ) ≤ C H ( S ) ≤ α C G ( S ) . where C G and C H is the capacity of the cut in G and H respectively. 10/25

  33. Cuts and Sparsifiers ◮ Goal: Approximate capacity C G ( S ) of any cut ( S , V \ S ) in G . Definition An α -sparsifier of graph G is a weighted subgraph H such that for any cut ( S , V \ S ), C G ( S ) ≤ C H ( S ) ≤ α C G ( S ) . where C G and C H is the capacity of the cut in G and H respectively. Theorem (Batson, Spielman, Srivastava) Exists offline algorithm A returning (1 + ǫ ) -sparsifier with O ( n ǫ − 2 ) edges. 10/25

  34. Cuts and Sparsifiers ◮ Goal: Approximate capacity C G ( S ) of any cut ( S , V \ S ) in G . Definition An α -sparsifier of graph G is a weighted subgraph H such that for any cut ( S , V \ S ), C G ( S ) ≤ C H ( S ) ≤ α C G ( S ) . where C G and C H is the capacity of the cut in G and H respectively. Theorem (Batson, Spielman, Srivastava) Exists offline algorithm A returning (1 + ǫ ) -sparsifier with O ( n ǫ − 2 ) edges. ◮ Idea: Use A as a black box to recursively sparsify graph stream. 10/25

  35. Basic Properties of Sparsifiers Lemma If H 1 and H 2 are α -sparsifiers of G 1 and G 2 . Then H 1 ∪ H 2 is an α -sparsifier of G 1 ∪ G 2 . 11/25

  36. Basic Properties of Sparsifiers Lemma If H 1 and H 2 are α -sparsifiers of G 1 and G 2 . Then H 1 ∪ H 2 is an α -sparsifier of G 1 ∪ G 2 . Lemma If J is an α -sparsifiers of H and H is an α -sparsifier of G. Then J is an α 2 -sparsifier of G. 11/25

  37. Stream Sparsification ◮ Divide stream into segments G 1 , G 2 , . . . each of t = O ( n ǫ − 2 ) edges. 12/25

  38. Stream Sparsification ◮ Divide stream into segments G 1 , G 2 , . . . each of t = O ( n ǫ − 2 ) edges. ◮ Consider binary tree over segments G=G1 ∪ G2 ∪ G3 ∪ G4 ∪ G5 ∪ G6 ∪ G7 ∪ G8 G1 ∪ G2 ∪ G3 ∪ G4 G5 ∪ G6 ∪ G7 ∪ G8 G1 ∪ G2 G3 ∪ G4 G5 ∪ G6 G7 ∪ G8 G1 G2 G3 G4 G5 G6 G7 G8 12/25

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend