triangle counting in large sparse graph
play

Triangle Counting in Large Sparse Graph Meng-Tsung Tsai - PowerPoint PPT Presentation

Triangle Counting in Large Sparse Graph Meng-Tsung Tsai r95065@cise.ntu.edu.tw Triangle Counting in Large Sparse Graph p.1/31 Problem Setting Triangle Counting in Large Sparse Graph p.2/31 Problem Setting(1/3) Goal : Calculating the


  1. Triangle Counting in Large Sparse Graph Meng-Tsung Tsai r95065@cise.ntu.edu.tw Triangle Counting in Large Sparse Graph – p.1/31

  2. Problem Setting Triangle Counting in Large Sparse Graph – p.2/31

  3. Problem Setting(1/3) Goal : Calculating the cluster coefficient of a given graph G ( V, E ) , where | V | = n and | E | = m . Triangle Counting in Large Sparse Graph – p.3/31

  4. Problem Setting(1/3) Goal : Calculating the cluster coefficient of a given graph G ( V, E ) , where | V | = n and | E | = m . Cluster coefficient indicates the probability that the friend of one’s friend is also one’s friend. Triangle Counting in Large Sparse Graph – p.3/31

  5. Problem Setting(1/3) Goal : Calculating the cluster coefficient of a given graph G ( V, E ) , where | V | = n and | E | = m . Cluster coefficient indicates the probability that the friend of one’s friend is also one’s friend. Cluster coefficient is one of the important features to examine whether a man-made graph fits to the real one. Triangle Counting in Large Sparse Graph – p.3/31

  6. Problem Setting(1/3) Goal : Calculating the cluster coefficient of a given graph G ( V, E ) , where | V | = n and | E | = m . Cluster coefficient indicates the probability that the friend of one’s friend is also one’s friend. Cluster coefficient is one of the important features to examine whether a man-made graph fits to the real one. In terms of graph theory, CC ( G ) = 3 × number of triangles ∈ G . number of triples ∈ G Triangle Counting in Large Sparse Graph – p.3/31

  7. Problem Setting(1/3) Goal : Calculating the cluster coefficient of a given graph G ( V, E ) , where | V | = n and | E | = m . Cluster coefficient indicates the probability that the friend of one’s friend is also one’s friend. Cluster coefficient is one of the important features to examine whether a man-made graph fits to the real one. In terms of graph theory, CC ( G ) = 3 × number of triangles ∈ G . number of triples ∈ G ✉ ✉ ✔ ❚ ❚ ✔ ❚ ❚ ✔ ✔ triple triangle ✉ ✉ ✉ ✉ Triangle Counting in Large Sparse Graph – p.3/31

  8. Problem Setting(2/3) Example : ❵❵ ③ ❵ ③ ✔ ❚ ✟ ✟✟✟✟ ✁ ✔ ❚ ✁ ✔ ❚ ✁ ③ ③ Triangle Counting in Large Sparse Graph – p.4/31

  9. Problem Setting(2/3) Example : ❵❵ ③ ❵ ③ ✔ ❚ ✟ ✟✟✟✟ ✁ ✔ ❚ ✁ ✔ ❚ ✁ ③ ③ number of triangle = 2 Triangle Counting in Large Sparse Graph – p.4/31

  10. Problem Setting(2/3) Example : ❵❵ ③ ❵ ③ ✔ ❚ ✟ ✟✟✟✟ ✁ ✔ ❚ ✁ ✔ ❚ ✁ ③ ③ number of triangle = 2 number of triple = 8 Triangle Counting in Large Sparse Graph – p.4/31

  11. Problem Setting(2/3) Example : ❵❵ ③ ❵ ③ ✔ ❚ ✟ ✟✟✟✟ ✁ ✔ ❚ ✁ ✔ ❚ ✁ ③ ③ number of triangle = 2 number of triple = 8 cluster coefficient = 3 × 2 / 8 = 0.75 Triangle Counting in Large Sparse Graph – p.4/31

  12. Problem Setting(2/3) Example : ❵❵ ③ ❵ ③ ✔ ❚ ✟ ✟✟✟✟ ✁ ✔ ❚ ✁ ✔ ❚ ✁ ③ ③ number of triangle = 2 number of triple = 8 cluster coefficient = 3 × 2 / 8 = 0.75 Triple counting is easy; therefore, the main difficulty to calculate CC ( G ) is triangle counting. Triangle Counting in Large Sparse Graph – p.4/31

  13. Problem Setting(3/3) Requirement : Seeking for an efficient algorithm to count the number of triangles such that it takes Ω( m ) space and Ω( n 3 ) time. Triangle Counting in Large Sparse Graph – p.5/31

  14. Problem Setting(3/3) Requirement : Seeking for an efficient algorithm to count the number of triangles such that it takes Ω( m ) space and Ω( n 3 ) time. We focus on social network graphs which cluster coefficient is especially important in. Triangle Counting in Large Sparse Graph – p.5/31

  15. Problem Setting(3/3) Requirement : Seeking for an efficient algorithm to count the number of triangles such that it takes Ω( m ) space and Ω( n 3 ) time. We focus on social network graphs which cluster coefficient is especially important in. In social network, the fact that m = ω ( n 2 ) usually holds. Triangle Counting in Large Sparse Graph – p.5/31

  16. Triangle Counting (Trivial Algorithm) Triangle Counting in Large Sparse Graph – p.6/31

  17. Trivial Algorithm ③ ✔ ❚ ✔ ❚ u v ✔ ❚ ③ ③ Triangle Counting in Large Sparse Graph – p.7/31

  18. Trivial Algorithm ③ ✔ ❚ + ✔ ❚ u v ✔ ❚ ③ ③ Triangle Counting in Large Sparse Graph – p.7/31

  19. Trivial Algorithm ③ ✔ ❚ + ✔ ❚ u v u v ✔ ❚ ③ ③ ③ ③ Triangle Counting in Large Sparse Graph – p.7/31

  20. Trivial Algorithm ③ ✔ ❚ + = ✔ ❚ u v u v ✔ ❚ ③ ③ ③ ③ Triangle Counting in Large Sparse Graph – p.7/31

  21. Trivial Algorithm ③ ③ ✔ ❚ ✔ ❚ + = ✔ ❚ ✔ ❚ u v u v ✔ ❚ ✔ ❚ ③ ③ ③ ③ ③ ③ Triangle Counting in Large Sparse Graph – p.7/31

  22. Trivial Algorithm ③ ③ ✔ ❚ ✔ ❚ + = ✔ ❚ ✔ ❚ u v u v ✔ ❚ ✔ ❚ ③ ③ ③ ③ ③ ③ Let M be a matrix such that M i,j is 1 iff an edge to connect vertices i and j exists. Triangle Counting in Large Sparse Graph – p.7/31

  23. Trivial Algorithm ③ ③ ✔ ❚ ✔ ❚ + = ✔ ❚ ✔ ❚ u v u v ✔ ❚ ✔ ❚ ③ ③ ③ ③ ③ ③ Let M be a matrix such that M i,j is 1 iff an edge to connect vertices i and j exists. Let M 2 be M · M . What does M 2 i,j mean? Triangle Counting in Large Sparse Graph – p.7/31

  24. Trivial Algorithm ③ ③ ✔ ❚ ✔ ❚ + = ✔ ❚ ✔ ❚ u v u v ✔ ❚ ✔ ❚ ③ ③ ③ ③ ③ ③ Let M be a matrix such that M i,j is 1 iff an edge to connect vertices i and j exists. Let M 2 be M · M . What does M 2 i,j mean? � M 2 △ = 1 i,j · M i,j 6 Triangle Counting in Large Sparse Graph – p.7/31

  25. Trivial Algorithm ③ ③ ✔ ❚ ✔ ❚ + = ✔ ❚ ✔ ❚ u v u v ✔ ❚ ✔ ❚ ③ ③ ③ ③ ③ ③ Let M be a matrix such that M i,j is 1 iff an edge to connect vertices i and j exists. Let M 2 be M · M . What does M 2 i,j mean? � M 2 △ = 1 i,j · M i,j 6 Simple Matrix Multiplication , Strassen Algorithm , and Winograd Algorithm all require O ( n 2 ) space to obtain M 2 . Not Acceptable! Triangle Counting in Large Sparse Graph – p.7/31

  26. Triangle Counting (Forward Algorithm) Triangle Counting in Large Sparse Graph – p.8/31

  27. Forward Algorithm(1/2) ❵❵❵❵❵ ⑦ ✔ ❚ ❵ ⑦ ✟ ✟✟✟✟✟✟✟✟✟ ✔ ❚ ✁ ✔ ❚ ✁ ✔ ❚ ✁ ✔ ❚ ✁ ✔ ❚ ✁ ⑦ ⑦ Triangle Counting in Large Sparse Graph – p.9/31

  28. Forward Algorithm(1/2) 2 4 ❵❵❵❵❵ ⑦ ✔ ❚ ❵ ⑦ ✟ ✟✟✟✟✟✟✟✟✟ ✔ ❚ ✁ ✔ ❚ ✁ ✔ ❚ ✁ 1 ✔ ❚ ✁ 3 ✔ ❚ ✁ ⑦ ⑦ Triangle Counting in Large Sparse Graph – p.9/31

  29. Forward Algorithm(1/2) 2 { 1 } 4 { 1 , 2 , 3 } ❵❵❵❵❵ ⑦ ✔ ❚ ❵ ⑦ ✟ ✟✟✟✟✟✟✟✟✟ ✔ ❚ ✁ ✔ ❚ ✁ ✔ ❚ ✁ 1 ✔ {} ❚ ✁ 3 { 2 } ✔ ❚ ✁ ⑦ ⑦ Triangle Counting in Large Sparse Graph – p.9/31

  30. Forward Algorithm(1/2) 2 { 1 } { 1 } ∩ { 1 , 2 , 3 } = { 1 } 4 { 1 , 2 , 3 } ❵❵❵❵❵ ⑦ ✔ ❚ ❵ ⑦ ✟ ✟✟✟✟✟✟✟✟✟ ✔ ❚ ✁ ✔ ❚ ✁ ✔ ❚ ✁ 1 ✔ {} ❚ ✁ 3 { 2 } ✔ ❚ ✁ ⑦ ⑦ Triangle Counting in Large Sparse Graph – p.9/31

  31. Forward Algorithm(1/2) 2 { 1 } { 1 } ∩ { 1 , 2 , 3 } = { 1 } 4 { 1 , 2 , 3 } ❵❵❵❵❵ ⑦ ✔ ❚ ❵ ⑦ ✟ ✟✟✟✟✟✟✟✟✟ ✔ ❚ ✁ ✔ ❚ ✁ ✔ ❚ ✁ 1 ✔ {} ❚ ✁ 3 { 2 } ✔ ❚ ✁ ⑦ ⑦ △ = � edge ( u,v ) ∈ E | N u ∩ N v | Triangle Counting in Large Sparse Graph – p.9/31

  32. Forward Algorithm(1/2) 2 { 1 } { 1 } ∩ { 1 , 2 , 3 } = { 1 } 4 { 1 , 2 , 3 } ❵❵❵❵❵ ⑦ ✔ ❚ ❵ ⑦ ✟ ✟✟✟✟✟✟✟✟✟ ✔ ❚ ✁ ✔ ❚ ✁ ✔ ❚ ✁ 1 ✔ {} ❚ ✁ 3 { 2 } ✔ ❚ ✁ ⑦ ⑦ △ = � edge ( u,v ) ∈ E | N u ∩ N v | all triangles can be found Triangle Counting in Large Sparse Graph – p.9/31

  33. Forward Algorithm(1/2) 2 { 1 } { 1 } ∩ { 1 , 2 , 3 } = { 1 } 4 { 1 , 2 , 3 } ❵❵❵❵❵ ⑦ ✔ ❚ ❵ ⑦ ✟ ✟✟✟✟✟✟✟✟✟ ✔ ❚ ✁ ✔ ❚ ✁ ✔ ❚ ✁ 1 ✔ {} ❚ ✁ 3 { 2 } ✔ ❚ ✁ ⑦ ⑦ △ = � edge ( u,v ) ∈ E | N u ∩ N v | all triangles can be found + all found objects are triangles Triangle Counting in Large Sparse Graph – p.9/31

  34. Forward Algorithm(1/2) 2 { 1 } { 1 } ∩ { 1 , 2 , 3 } = { 1 } 2 4 { 1 , 2 , 3 } 1 ❵❵❵❵❵ ❵❵❵❵❵ ⑦ ⑦ ✔ ❚ ✔ ❚ ❵ ❵ ⑦ ⑦ ✟ ✟ ✟✟✟✟✟✟✟✟✟ ✔ ❚ ✟✟✟✟✟✟✟✟✟ ✔ ❚ ✁ ✁ ✔ ❚ ✁ ✔ ❚ ✁ ✔ ❚ ✁ ✔ ❚ ✁ 1 ✔ {} ❚ ✁ 3 { 2 } 4 ✔ ❚ ✁ 3 ✔ ❚ ✁ ✔ ❚ ✁ ⑦ ⑦ ⑦ ⑦ △ = � edge ( u,v ) ∈ E | N u ∩ N v | all triangles can be found + all found objects are triangles Triangle Counting in Large Sparse Graph – p.9/31

Recommend


More recommend