Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Network And SNA Theory: Basic Concepts R. Nabati Department of Computer Engineering Islamic Azad University of Sanandaj

Similar presentations


Presentation on theme: "Introduction to Network And SNA Theory: Basic Concepts R. Nabati Department of Computer Engineering Islamic Azad University of Sanandaj"— Presentation transcript:

1 Introduction to Network And SNA Theory: Basic Concepts R. Nabati Department of Computer Engineering Islamic Azad University of Sanandaj www.rnabati.com

2 What is a Network? Network = graph Network = graph Informally a graph is a set of nodes joined by a set of lines or arrows. Informally a graph is a set of nodes joined by a set of lines or arrows. 1 1 2 3 4 4 5566 2 3

3 Graph-based representations Representing a problem as a graph can provide a different point of view Representing a problem as a graph can make a problem much simpler More accurately, it can provide the appropriate tools for solving the problem

4 What is network theory? Network theory provides a set of techniques for analysing graphs Complex systems network theory provides techniques for analysing structure in a system of interacting agents, represented as a network Applying network theory to a system means using a graph-theoretic representation

5 What makes a problem graph-like? There are two components to a graph Nodes and edges In graph-like problems, these components have natural correspondences to problem elements Entities are nodes and interactions between entities are edges Most complex systems are graph-like

6 Friendship Network

7 Scientific collaboration network

8 Business ties in US biotech- industry

9 Genetic interaction network

10 Protein-Protein Interaction Networks

11 Transportation Networks

12 Internet

13 Ecological Networks

14 Graph Theory - History Leonhard Euler's paper on “Seven Bridges of Königsberg”, published in 1736.

15

16 Graph TheoryCh. 1. Fundamental Concept16 A Model A vertex : a region An edge : a path(bridge) between two regions e1e1 e2e2 e3e3 e4e4 e6e6 e5e5 e7e7 Z Y X W X Y Z W

17 Graph Theory - History Cycles in Polyhedra Thomas P. Kirkman William R. Hamilton Hamiltonian cycles in Platonic graphs

18 Graph Theory - History Gustav Kirchhoff Trees in Electric Circuits

19 Graph Theory - History Arthur Cayley James J. Sylvester George Polya Enumeration of Chemical Isomers

20 Graph Theory - History Francis Guthrie Auguste DeMorgan Four Colors of Maps

21 Definition: Graph G is an ordered triple G:=(V, E, f) G is an ordered triple G:=(V, E, f) V is a set of nodes, points, or vertices. V is a set of nodes, points, or vertices. E is a set, whose elements are known as edges or lines. E is a set, whose elements are known as edges or lines. f is a function f is a function maps each element of E maps each element of E to an unordered pair of vertices in V. to an unordered pair of vertices in V.

22 Definitions Vertex Vertex Basic Element Basic Element Drawn as a node or a dot. Drawn as a node or a dot. Vertex set of G is usually denoted by V(G), or V Vertex set of G is usually denoted by V(G), or V Edge Edge A set of two elements A set of two elements Drawn as a line connecting two vertices, called end vertices, or endpoints. Drawn as a line connecting two vertices, called end vertices, or endpoints. The edge set of G is usually denoted by E(G), or E. The edge set of G is usually denoted by E(G), or E.

23 Example V:={1,2,3,4,5,6} E:={{1,2},{1,5},{2,3},{2,5},{3,4},{4,5},{4,6}}

24 Simple Graphs Simple graphs are graphs without multiple edges or self-loops.

25 Directed Graph (digraph) Edges have directions Edges have directions An edge is an ordered pair of nodes An edge is an ordered pair of nodes loop node multiple arc arc

26 Weighted graphs 1 2 3 4 56.5 1.2.2.5 1.5.3 1 4 56 2 3 2 1 3 5 is a graph for which each edge has an associated weight, usually given by a weight function w: E  R.

27 Structures and structural metrics Graph structures are used to isolate interesting or important sections of a graph Structural metrics provide a measurement of a structural property of a graph Global metrics refer to a whole graph Local metrics refer to a single node in a graph

28 Graph structures Identify interesting sections of a graph Interesting because they form a significant domain-specific structure, or because they significantly contribute to graph properties A subset of the nodes and edges in a graph that possess certain characteristics, or relate to each other in particular ways

29 Connectivity a graph a graph is connected if you can get from any node to any other by following a sequence of edges OR any two nodes are connected by a path. A directed graph is strongly connected if there is a directed path from any node to any other node.

30 Component Every disconnected graph can be split up into a number of connected components. Every disconnected graph can be split up into a number of connected components.

31 Degree Number of edges incident on a node Number of edges incident on a node The degree of 5 is 3

32 Degree (Directed Graphs) In-degree: Number of edges entering In-degree: Number of edges entering Out-degree: Number of edges leaving Out-degree: Number of edges leaving Degree = indeg + outdeg Degree = indeg + outdeg outdeg(1)=2 indeg(1)=0 outdeg(2)=2 indeg(2)=2 outdeg(3)=1 indeg(3)=4

33 Degree: Simple Facts If G is a graph with m edges, then  deg(v) = 2m = 2 |E | If G is a digraph then  indeg(v)=  outdeg(v) = |E | Number of Odd degree Nodes is even

34 Walks A walk of length k in a graph is a succession of k (not necessarily different) edges of the form uv,vw,wx,…,yz. This walk is denote by uvwx…xz, and is referred to as a walk between u and z. A walk is closed is u=z.

35 Graph TheoryCh. 1. Fundamental Concept35 Chromatic Number The chromatic number of a graph G, written x(G), is the minimum number of colors needed to label the vertices so that adjacent vertices receive different colors Red Green Blue x(G) = 3

36 Path A path is a walk in which all the edges and all the nodes are different. A path is a walk in which all the edges and all the nodes are different. Walks and Paths 1,2,5,2,3,4 1,2,5,2,3,2,1 1,2,3,4,6 walk of length 5 CW of length 6 path of length 4

37 Cycle A cycle is a closed walk in which all the edges are different. 1,2,5,1 2,3,4,5,2 3-cycle 4-cycle

38 Special Types of Graphs Empty Graph / Edgeless graph Empty Graph / Edgeless graph No edge No edge Null graph Null graph No nodes No nodes Obviously no edge Obviously no edge

39 Trees Connected Acyclic Graph Connected Acyclic Graph Two nodes have exactly one path between them Two nodes have exactly one path between them

40 Special Trees Paths Stars

41 Connected Graph All nodes have the same degree Regular

42 Special Regular Graphs: Cycles C 3 C 4 C 5

43 Bipartite graph V can be partitioned into 2 sets V 1 and V 2 such that (u,v)  E implies V can be partitioned into 2 sets V 1 and V 2 such that (u,v)  E implies either u  V 1 and v  V 2 either u  V 1 and v  V 2 OR v  V 1 and u  V 2. OR v  V 1 and u  V 2.

44 Complete Graph Every pair of vertices are adjacent Every pair of vertices are adjacent Has n(n-1)/2 edges Has n(n-1)/2 edges

45 Complete Bipartite Graph Bipartite Variation of Complete Graph Bipartite Variation of Complete Graph Every node of one set is connected to every other node on the other set Every node of one set is connected to every other node on the other set Stars

46 Planar Graphs Can be drawn on a plane such that no two edges intersect Can be drawn on a plane such that no two edges intersect K 4 is the largest complete graph that is planar K 4 is the largest complete graph that is planar

47 Planar graphs 47

48 Subgraph Vertex and edge sets are subsets of those of G Vertex and edge sets are subsets of those of G a supergraph of a graph G is a graph that contains G as a subgraph. a supergraph of a graph G is a graph that contains G as a subgraph.

49 Special Subgraphs: Cliques. A clique is a maximum complete connected subgraph. AB D H FE C IG

50 Spanning subgraph Subgraph H has the same vertex set as G. Subgraph H has the same vertex set as G. Possibly not all the edges Possibly not all the edges “H spans G”. “H spans G”.

51 Spanning tree Let G be a connected graph. Then a spanning tree in G is a subgraph of G that includes every node and is also a tree. Let G be a connected graph. Then a spanning tree in G is a subgraph of G that includes every node and is also a tree.

52 Isomorphism Bijection, i.e., a one-to-one mapping: Bijection, i.e., a one-to-one mapping: f : V(G) -> V(H) u and v from G are adjacent if and only if f(u) and f(v) are adjacent in H. If an isomorphism can be constructed between two graphs, then we say those graphs are isomorphic. If an isomorphism can be constructed between two graphs, then we say those graphs are isomorphic.

53 Isomorphism Problem Determining whether two graphs are isomorphic Determining whether two graphs are isomorphic Although these graphs look very different, they are isomorphic; one isomorphism between them is Although these graphs look very different, they are isomorphic; one isomorphism between them is f(a)=1 f(b)=6 f(c)=8 f(d)=3 f(g)=5 f(h)=2 f(i)=4 f(j)=7

54 Graph TheoryCh. 1. Fundamental Concept54 Components 1.2.8 The components of a graph G are its maximal connected subgraphs An isolated vertex is a vertex of degree 0

55 Representation (Matrix) Incidence Matrix Incidence Matrix V x E V x E [vertex, edges] contains the edge's data [vertex, edges] contains the edge's data Adjacency Matrix Adjacency Matrix V x V V x V Boolean values (adjacent or not) Boolean values (adjacent or not) Or Edge Weights Or Edge Weights

56 Matrices

57 Representation (List) Edge List Edge List pairs (ordered if directed) of vertices pairs (ordered if directed) of vertices Optionally weight and other data Optionally weight and other data Adjacency List (node list) Adjacency List (node list)

58 Implementation of a Graph. Adjacency-list representation Adjacency-list representation an array of |V | lists, one for each vertex in V. an array of |V | lists, one for each vertex in V. For each u  V, ADJ [ u ] points to all its adjacent vertices. For each u  V, ADJ [ u ] points to all its adjacent vertices.

59 Edge and Node Lists Edge List 1 2 2 3 2 5 3 4 3 4 5 5 3 5 4 Node List 1 2 2 2 3 5 3 4 3 5 5 3 4

60 Edge List 1 2 1.2 2 4 0.2 4 5 0.3 4 1 0.5 5 4 0.5 6 3 1.5 Edge Lists for Weighted Graphs

61 Topological Distance A shortest path is the minimum path connecting two nodes. The number of edges in the shortest path connecting p and q is the topological distance between these two nodes, d p,q

62 Degree Centrality B ED C A 2421124211 degree

63 Betweenness centrality The number of shortest paths in the graph that pass through the node divided by the total number of shortest paths.

64 Betweenness centrality B Shortest paths are: AB, AC, ABD, ABE, BC, BD, BE, CBD, CBE, DBE B has a BC of 5 A C D E

65 Betweenness centrality Nodes with a high betweenness centrality are interesting because they control information flow in a network may be required to carry more information And therefore, such nodes may be the subject of targeted attack

66 Closeness centrality The normalised inverse of the sum of topological distances in the graph.

67 B ED C A 6467764677 Closeness centrality

68 B ED C A Closeness 0.67 1.00 0.67 0.57

69 Node B is the most central one in spreading information from it to the other nodes in the network. Closeness centrality

70 |V | x |V | matrix D = ( d ij ) such that d ij is the topological distance between i and j. Distance Matrix

71  A community is defined as a clique in the communicability graph.  Identifying communities is reduced to the “all cliques problem” in the communicability graph. Communicability Graph

72 Social (Friendship) Network Communities: Example

73 The Network Its Communicability Graph

74 Communities Social Networks Metabolic Networks

75 Social Network Analysis Introduction

76 2 2 5 5 4 4 3 3 1 1 Diameter 2 2 5 5 4 4 3 3 1 1 Average Path Length The longest shortest path in a graph The average of the shortest paths for all pairs of nodes. 76

77 Characterizing networks:Is everything connected? 77

78 The adjacency matrix of a network with several components can be written in a block-diagonal form, so that nonzero elements are confined to squares, with all other elements being zero: CONNECTIVITY OF UNDIRECTED GRAPHS Adjacency Matrix 78

79 Bridges and Local Bridges0 And edge that joins two nodes A and B in a graph is called a bridge if deleting the edge would cause A and B to lay in two different components local bridge - in real-world networks (with a giant component) - if deleting an edge between A and B would increase distance > 2 79

80 Clustering coefficient 80

81 Clustering coefficient: what fraction of your neighbors are connected? Node i with degree k i C i in [0,1] CLUSTERING COEFFICIENT 81

82 WWW > directed multigraph with self-interactions Protein Interactions > undirected unweighted with self-interactions Collaboration network > undirected multigraph or weighted. Mobile phone calls > directed, weighted. Facebook Friendship links > undirected, unweighted. GRAPHOLOGY: Real networks can have multiple characteristics 82

83 Undirected network N=2,018 proteins as nodes L=2,930 binding interactions as links. Average degree =2.90. Not connected: 185 components the largest (giant component) 1,647 nodes A CASE STUDY: PROTEIN-PROTEIN INTERACTION NETWORK 83

84 p k is the probability that a node has degree k. N k = # nodes with degree k p k = N k / N A CASE STUDY: PROTEIN-PROTEIN INTERACTION NETWORK 84

85 d max =14 =5.61 A CASE STUDY: PROTEIN-PROTEIN INTERACTION NETWORK 85

86 =0.12 A CASE STUDY: PROTEIN-PROTEIN INTERACTION NETWORK 86

87 Real network properties Most nodes have only a small number of neighbors (degree), but there are some nodes with very high degree (power-law degree distribution) scale-free networks If a node x is connected to y and z, then y and z are likely to be connected high clustering coefficient Most nodes are just a few edges away on average. small world networks Networks from very diverse areas (from internet to biological networks) have similar properties Is it possible that there is a unifying underlying generative process? 87

88 The basic random graph model The measurements on real networks are usually compared against those on “random networks” The basic G n,p (Erdös-Renyi) random graph model: n : the number of vertices 0 ≤ p ≤ 1 for each pair (i,j), generate the edge (i,j) independently with probability p

89 Degree distributions Problem: find the probability distribution that best fits the observed data degree frequency k fkfk f k = fraction of nodes with degree k p(k) = probability of a randomly selected node to have degree k

90 Power-law distributions The degree distributions of most real-life networks follow a power law Right-skewed/Heavy-tail distribution there is a non-negligible fraction of nodes that has very high degree (hubs) scale-free: no characteristic scale, average is not informative In stark contrast with the random graph model! Poisson degree distribution, z=np highly concentrated around the mean the probability of very high degree nodes is exponentially small p(k) = Ck - 

91 Power-law signature Power-law distribution gives a line in the log-log plot  : power-law exponent (typically 2 ≤  ≤ 3) degree frequency log degree log frequency α log p(k) = -  logk + logC

92 Power Laws Albert and Barabasi (1999) Power-law distributions are straight lines in log-log space. -- slope being r y=k -r  log y = -r log k  ly= -r lk How should random graphs be generated to create a power-law distribution of node degrees? Hint: Pareto’s* Law: Wealth distribution follows a power law. Power laws in real networks: (a) WWW hyperlinks (b) co-starring in movies (c) co-authorship of physicists (d) co-authorship of neuroscientists * Same Velfredo Pareto, who defined Pareto optimality in game theory.

93 Examples of degree distribution for power laws Taken from [Newman 2003]

94 A random graph example

95 What is a Logarithm? The common or base-10 logarithm of a number is the power to which 10 must be raised to give the number. Since 100 = 10 2, the logarithm of 100 is equal to 2. This is written as: Log(100) = 2. 1,000,000 = 10 6 (one million), and Log (1,000,000) = 6.

96 Years before present (YBP)

97 Data plotted with linear scale All except the first two data points are hidden on the axis.

98 Log (YBP)

99 Plot using Logs All data are well represented despite their wide range.

100 Your calculator should have a button marked LOG. Make sure you can use it to generate this table.

101 Copyright © by Houghton Mifflin Company, Inc. All rights reserved.101 x y Graph f(x) = log 2 x Since the logarithm function is the inverse of the exponential function of the same base, its graph is the reflection of the exponential function in the line y = x. 83 42 21 10 –1 –2 2x2x x y = log 2 x y = x y = 2 x (1, 0) x-intercept horizontal asymptote y = 0 vertical asymptote x = 0

102 Example Sketch the graph of the function y = ln x. Solution We first sketch the graph of y = e x. 1 x y 1 y =exy =exy =exy =ex y = ln x y =xy =xy =xy =x  The required graph is the mirror image of the graph of y = e x with respect to the line y = x:

103 Exponential distribution Observed in some technological or collaboration networks Identified by a line in the log-linear plot p(k) = e - k log p(k) = - k + log degree log frequency λ

104 104 An Experiment by Milgram (1967) Outcome revealed two fundamental components of a social network: Very short paths between arbitrary pairs of nodes Individuals operating with purely local information are very adept at finding these paths

105 105 What is the “small world” phenomenon? Principle that most people in a society are linked by short chains of acquaintances Sometimes referred to as the “six degrees of separation” theory

106 References  Aldous & Wilson, Graphs and Applications. An Introductory Approach, Springer, 2000.  Wasserman & Faust, Social Network Analysis, Cambridge University Press, 2008.  Estrada & Rodríguez-Velázquez, Phys. Rev. E 2005, 71, 056103.  Estrada & Hatano, Phys. Rev. E. 2008, 77, 036111.

107 107 Questions?Questions?


Download ppt "Introduction to Network And SNA Theory: Basic Concepts R. Nabati Department of Computer Engineering Islamic Azad University of Sanandaj"

Similar presentations


Ads by Google