network science
play

Network Science Barab asi: Ch. 2 Graph Theory Lecture 2 Joao - PowerPoint PPT Presentation

Network Science Barab asi: Ch. 2 Graph Theory Lecture 2 Joao Meidanis University of Campinas, Brazil September 26, 2020 Summary Brief Statistics Review 1 Paths and Distances 2 Breadth First Search (BFS) 3 Connectivity 4


  1. Network Science Barab´ asi: Ch. 2 — Graph Theory — Lecture 2 Joao Meidanis University of Campinas, Brazil September 26, 2020

  2. Summary Brief Statistics Review 1 Paths and Distances 2 Breadth First Search (BFS) 3 Connectivity 4 Clustering coefficients 5 Meidanis (Unicamp) Network Science September 26, 2020 2 / 22

  3. Brief Statistics Review Meidanis (Unicamp) Network Science September 26, 2020 3 / 22

  4. Average, moments, standard deviation For a sample of N values x 1 , x 2 , . . . , x N : Average (mean): N � x � = x 1 + x 2 + . . . + x N = 1 � x i N N i =1 The n th moment: N � x n � = x n 1 + x n 2 + . . . + x n = 1 � N x n i N N i =1 Standard deviation: � N � � 1 � � ( x i − � x � ) 2 σ x = N i =1 Meidanis (Unicamp) Network Science September 26, 2020 4 / 22

  5. Distributions For a sample of N values x 1 , x 2 , . . . , x N : Distribution: N p x = 1 � δ ( x , x i ) N i =1 where the Kronecker δ is defined as � 1 if a = b δ ( a , b ) = 0 otherwise We have: � p x = 1 x Continuous case (density function f ): � ∞ f ( x ) dx = 1 −∞ Meidanis (Unicamp) Network Science September 26, 2020 5 / 22

  6. Paths and Distances Meidanis (Unicamp) Network Science September 26, 2020 6 / 22

  7. Paths and Length Physical distance usually irrelevant in networks: a webpage can link to others very far away two neighbors may not know each other Definition: a path is a route following network links (some texts require distinct nodes) Path length : number of links traversed Meidanis (Unicamp) Network Science September 26, 2020 7 / 22

  8. Shortest Paths, Distance, Diameter Shortest path from i to j : smallest number of links d ij = distance from i to j = length of a shortest path from i to j Undireted network: d ij = d ji Directed network: often d ij � = d ji Directed network: existence of i → j path does not guarantee existence of j → i path Computing distances: powers of adjacency matrix — good to know BFS (breadth first search) algorithm — fast — good to run d max = diameter = maximum distance in network Average distance (connected graph): 1 1 � � � d � = d ij = d ij N ( N − 1) 2 L max i � = j i � = j Meidanis (Unicamp) Network Science September 26, 2020 8 / 22

  9. Number of Paths N ( k ) = number of length- k paths from i to j ij Can be computed from adjacency matrix A ij There is a link from i to j if and only if A ij = 1 Then N (1) = A ij ij There is a length-2 path from i to j if and only if there is k such that A ik A kj = 1 The number of such paths is N (2) k A ik A kj = A 2 = � ij ij And so on. In general N ( k ) = A k ij ij Meidanis (Unicamp) Network Science September 26, 2020 9 / 22

  10. Breadth First Search (BFS) Meidanis (Unicamp) Network Science September 26, 2020 10 / 22

  11. Breadth First Search (BFS) algorithm: step 0 Meidanis (Unicamp) Network Science September 26, 2020 11 / 22

  12. Breadth First Search (BFS) algorithm: step 1 Meidanis (Unicamp) Network Science September 26, 2020 12 / 22

  13. Breadth First Search (BFS) algorithm: step 2 Meidanis (Unicamp) Network Science September 26, 2020 13 / 22

  14. Breadth First Search (BFS) algorithm: step 3 Meidanis (Unicamp) Network Science September 26, 2020 14 / 22

  15. Breadth First Search (BFS) algorithm: step 4 Meidanis (Unicamp) Network Science September 26, 2020 15 / 22

  16. Connectivity Meidanis (Unicamp) Network Science September 26, 2020 16 / 22

  17. Connectivity for Undirected Graphs Connected graph : any two nodes can be joined by a path Disconnected graph : two or more connected components Giant component : the largest connected component Isolates : the other connected components Bridge : link whose removal increases the number of components Meidanis (Unicamp) Network Science September 26, 2020 17 / 22

  18. Connectivity for Directed Graphs Strongly Connected graph: has paths back and forth from every node to every other node (e.g., AB path and BA path) Weakly connected graph: connected if we disregard link orientations Strongly connected components: can be identified; sometimes a single node In-component : nodes that reach a s.c.c. Out-component : nodes reachable from a s.c.c. Meidanis (Unicamp) Network Science September 26, 2020 18 / 22

  19. Clustering coefficients Meidanis (Unicamp) Network Science September 26, 2020 19 / 22

  20. Clustering coefficient What fraction of the possible links exist among my neighbors? 2 L i C i = k i ( k i − 1) , where: L i = number of links between node i ’s neighbors k i = degree of node i C i ∈ [0 , 1] C i = 1 C i = 1 / 2 C i = 0 Meidanis (Unicamp) Network Science September 26, 2020 20 / 22

  21. Clustering coefficient for the entire network Average clustering coefficient N � C � = 1 � C i N i =1 Global clustering coefficient 3 × #Triangles C ∆ = #Connected Triplets connected triplet : path ABC , but ABC and CBA are considered to be the same triplet. a triangle contributes 3 triplets to the denominator a path ABC without link AC contributes 1 triplet to the denominator both � C � , C ∆ ∈ [0 , 1], not necessarily equal Meidanis (Unicamp) Network Science September 26, 2020 21 / 22

  22. Clustering coefficients: Example � C � = 13 42 ∼ 0 . 310 C ∆ = 6 16 = 0 . 375 Meidanis (Unicamp) Network Science September 26, 2020 22 / 22

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