algorithms for big data vii
play

Algorithms for Big Data (VII) Chihao Zhang Shanghai Jiao Tong - PowerPoint PPT Presentation

Algorithms for Big Data (VII) Chihao Zhang Shanghai Jiao Tong University Nov. 1, 2019 Algorithms for Big Data (VII) 1/17 Review We introduced the graph stream last week. The graph has vertices, but the edges are given in a streaming


  1. Algorithms for Big Data (VII) Chihao Zhang Shanghai Jiao Tong University Nov. 1, 2019 Algorithms for Big Data (VII) 1/17

  2. Review We introduced the graph stream last week. The graph has vertices, but the edges are given in a streaming fashion. Compute graph properties in time. This can be done for connectivity and bipartiteness . Algorithms for Big Data (VII) 2/17

  3. Review We introduced the graph stream last week. The graph has vertices, but the edges are given in a streaming fashion. Compute graph properties in time. This can be done for connectivity and bipartiteness . Algorithms for Big Data (VII) 2/17

  4. Review We introduced the graph stream last week. Compute graph properties in time. This can be done for connectivity and bipartiteness . Algorithms for Big Data (VII) 2/17 The graph has n vertices, but the edges are given in a streaming fashion.

  5. Review We introduced the graph stream last week. This can be done for connectivity and bipartiteness . Algorithms for Big Data (VII) 2/17 The graph has n vertices, but the edges are given in a streaming fashion. Compute graph properties in o ( n 2 ) time.

  6. Review We introduced the graph stream last week. This can be done for connectivity and bipartiteness . Algorithms for Big Data (VII) 2/17 The graph has n vertices, but the edges are given in a streaming fashion. Compute graph properties in o ( n 2 ) time.

  7. Shortest Path Given an undirected simple graph . We want to answer the query “what is the minimum distance between and for ”. Our algorithm computes a subgraph of such that for some constant . Algorithms for Big Data (VII) 3/17

  8. Shortest Path Our algorithm computes a subgraph of such that for some constant . Algorithms for Big Data (VII) 3/17 Given an undirected simple graph G = ( V, E ) . We want to answer the query “what is the minimum distance between u and v for u, v ∈ V ”.

  9. Algorithms for Big Data (VII) Shortest Path 3/17 Given an undirected simple graph G = ( V, E ) . We want to answer the query “what is the minimum distance between u and v for u, v ∈ V ”. Our algorithm computes a subgraph H = ( V, E H ) of G such that ∀ u, v ∈ V, d G ( u, v ) ≤ d H ( u, v ) ≤ α · d G ( u, v ) for some constant α ≥ 1 .

  10. Algorithm Shortest Path Init: end if Algorithms for Big Data (VII) 4/17 E H ← ∅ ; On Input ( u, v ) : if d H ( u, v ) ≥ α + 1 then H ← H ∪ { ( u, v ) } Output: On query ( u, v ) Output d H ( u, v ) .

  11. 5/17 . Algorithms for Big Data (VII) In all, we have , it must hold that into , then when we are trying to insert If , then Consider the shortest path from If . Then : in to Clearly, d H ( u, v ) ≥ d H ( u, v ) as H contains less edges.

  12. Then . If , then . If , then when we are trying to insert into , it must hold that In all, we have Algorithms for Big Data (VII) 5/17 Clearly, d H ( u, v ) ≥ d H ( u, v ) as H contains less edges. Consider the shortest path from u to v in G : u = x 1 , x 2 , . . . , x k = v.

  13. , then If . If , then when we are trying to insert into , it must hold that In all, we have Algorithms for Big Data (VII) 5/17 Clearly, d H ( u, v ) ≥ d H ( u, v ) as H contains less edges. Consider the shortest path from u to v in G : u = x 1 , x 2 , . . . , x k = v. Then d G ( u, v ) = ∑ k − 1 i = 1 d ( x i , x i + 1 ) .

  14. If , then when we are trying to insert into , it must hold that In all, we have Algorithms for Big Data (VII) 5/17 Clearly, d H ( u, v ) ≥ d H ( u, v ) as H contains less edges. Consider the shortest path from u to v in G : u = x 1 , x 2 , . . . , x k = v. Then d G ( u, v ) = ∑ k − 1 i = 1 d ( x i , x i + 1 ) . If ( x i , x i + 1 ) ∈ E H , then d H ( x i , x i + 1 ) = d G ( x i , x i + 1 ) .

  15. In all, we have Algorithms for Big Data (VII) 5/17 Clearly, d H ( u, v ) ≥ d H ( u, v ) as H contains less edges. Consider the shortest path from u to v in G : u = x 1 , x 2 , . . . , x k = v. Then d G ( u, v ) = ∑ k − 1 i = 1 d ( x i , x i + 1 ) . If ( x i , x i + 1 ) ∈ E H , then d H ( x i , x i + 1 ) = d G ( x i , x i + 1 ) . If ( x i , x i + 1 ) ̸∈ E H , then when we are trying to insert ( x i , x i + 1 ) into E H , it must hold that d H ( x i , x i + 1 ) ≤ α.

  16. Algorithms for Big Data (VII) In all, we have 5/17 Clearly, d H ( u, v ) ≥ d H ( u, v ) as H contains less edges. Consider the shortest path from u to v in G : u = x 1 , x 2 , . . . , x k = v. Then d G ( u, v ) = ∑ k − 1 i = 1 d ( x i , x i + 1 ) . If ( x i , x i + 1 ) ∈ E H , then d H ( x i , x i + 1 ) = d G ( x i , x i + 1 ) . If ( x i , x i + 1 ) ̸∈ E H , then when we are trying to insert ( x i , x i + 1 ) into E H , it must hold that d H ( x i , x i + 1 ) ≤ α. d H ( u, v ) ≤ α · d G ( u, v ) .

  17. The girth Space Consumption We need a bit of graph theory to analyze the space consumption. of a graph is the length of its shortest cycle. It is clear that . Theorem Let be a sufgiciently large graph with . Let and . Then Algorithms for Big Data (VII) 6/17

  18. The girth Space Consumption We need a bit of graph theory to analyze the space consumption. of a graph is the length of its shortest cycle. It is clear that . Theorem Let be a sufgiciently large graph with . Let and . Then Algorithms for Big Data (VII) 6/17

  19. Space Consumption We need a bit of graph theory to analyze the space consumption. It is clear that . Theorem Let be a sufgiciently large graph with . Let and . Then Algorithms for Big Data (VII) 6/17 The girth g ( G ) of a graph G is the length of its shortest cycle.

  20. Space Consumption We need a bit of graph theory to analyze the space consumption. Theorem Let be a sufgiciently large graph with . Let and . Then Algorithms for Big Data (VII) 6/17 The girth g ( G ) of a graph G is the length of its shortest cycle. It is clear that g ( H ) ≥ α + 2 .

  21. Space Consumption We need a bit of graph theory to analyze the space consumption. Theorem Then Algorithms for Big Data (VII) 6/17 The girth g ( G ) of a graph G is the length of its shortest cycle. It is clear that g ( H ) ≥ α + 2 . Let G = ( V, E ) be a sufgiciently large graph with g ( G ) ≥ k . Let n = | V | and m = | E | . 1 1 + ⌋ . ⌊ k − 1 m ≤ n + n 2

  22. Let be the average degree of , then contains a -core. (Why?) The -core has girth at least , so we can find a BFS tree in it with depth and width . The number of the vertices satisfies This bound is in fact tight, can you prove it? Algorithms for Big Data (VII) 7/17 The k -core of a graph G is a subgraph whose degree is at least k .

  23. The -core has girth at least , so we can find a BFS tree in it with depth and width . The number of the vertices satisfies This bound is in fact tight, can you prove it? Algorithms for Big Data (VII) 7/17 The k -core of a graph G is a subgraph whose degree is at least k . Let d = 2m/n be the average degree of G , then G contains a d/2 -core. (Why?)

  24. The number of the vertices satisfies This bound is in fact tight, can you prove it? Algorithms for Big Data (VII) 7/17 The k -core of a graph G is a subgraph whose degree is at least k . Let d = 2m/n be the average degree of G , then G contains a d/2 -core. (Why?) The d/2 -core has girth at least k , so we can find a BFS tree in it with depth ⌊ k − 1 2 ⌋ and width d 2 − 1 .

  25. 7/17 The number of the vertices satisfies Algorithms for Big Data (VII) This bound is in fact tight, can you prove it? The k -core of a graph G is a subgraph whose degree is at least k . Let d = 2m/n be the average degree of G , then G contains a d/2 -core. (Why?) The d/2 -core has girth at least k , so we can find a BFS tree in it with depth ⌊ k − 1 2 ⌋ and width d 2 − 1 . ( d ) ⌊ k − 1 ( m ) ⌊ k − 1 2 ⌋ 2 ⌋ n ≥ 2 − 1 = n − 1 .

  26. 7/17 The number of the vertices satisfies Algorithms for Big Data (VII) This bound is in fact tight, can you prove it? The k -core of a graph G is a subgraph whose degree is at least k . Let d = 2m/n be the average degree of G , then G contains a d/2 -core. (Why?) The d/2 -core has girth at least k , so we can find a BFS tree in it with depth ⌊ k − 1 2 ⌋ and width d 2 − 1 . ( d ) ⌊ k − 1 ( m ) ⌊ k − 1 2 ⌋ 2 ⌋ n ≥ 2 − 1 = n − 1 .

  27. The problem of finding maximum matching is a famous polynmial-time solvable Now we try to approximate it in the streaming setuing. Matchings Let be a graph, a matching consisting of edges sharing no vertex. problem. Algorithms for Big Data (VII) 8/17

  28. The problem of finding maximum matching is a famous polynmial-time solvable Now we try to approximate it in the streaming setuing. Matchings problem. Algorithms for Big Data (VII) 8/17 Let G = ( V, E ) be a graph, a matching M ⊆ E consisting of edges sharing no vertex.

  29. Now we try to approximate it in the streaming setuing. Matchings problem. Algorithms for Big Data (VII) 8/17 Let G = ( V, E ) be a graph, a matching M ⊆ E consisting of edges sharing no vertex. The problem of finding maximum matching is a famous polynmial-time solvable

  30. Matchings problem. Algorithms for Big Data (VII) 8/17 Let G = ( V, E ) be a graph, a matching M ⊆ E consisting of edges sharing no vertex. The problem of finding maximum matching is a famous polynmial-time solvable Now we try to approximate it in the streaming setuing.

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