Network Science
Total Page:16
File Type:pdf, Size:1020Kb
NETWORK SCIENCE Random Networks Prof. Marcello Pelillo Ca’ Foscari University of Venice a.y. 2016/17 Section 3.2 The random network model RANDOM NETWORK MODEL Pál Erdös Alfréd Rényi (1913-1996) (1921-1970) Erdös-Rényi model (1960) Connect with probability p p=1/6 N=10 <k> ~ 1.5 SECTION 3.2 THE RANDOM NETWORK MODEL BOX 3.1 DEFINING RANDOM NETWORKS RANDOM NETWORK MODEL Network science aims to build models that reproduce the properties of There are two equivalent defini- real networks. Most networks we encounter do not have the comforting tions of a random network: Definition: regularity of a crystal lattice or the predictable radial architecture of a spi- der web. Rather, at first inspection they look as if they were spun randomly G(N, L) Model A random graph is a graph of N nodes where each pair (Figure 2.4). Random network theoryof nodes embraces is connected this byapparent probability randomness p. N labeled nodes are connect- by constructing networks that are truly random. ed with L randomly placed links. Erds and Rényi used From a modeling perspectiveTo a constructnetwork is a arandom relatively network simple G(N, object, p): this definition in their string consisting of only nodes and links. The real challenge, however, is to decide of papers on random net- where to place the links between1) the Start nodes with so thatN isolated we reproduce nodes the com- works [2-9]. plexity of a real system. In this 2)respect Select the a philosophynode pair, behindand generate a random a network is simple: We assume thatrandom this goal number is best betweenachieved by0 and placing 1. If the G(N, p) Model random number exceeds p, connect the the links randomly between the nodes.selected That takes node us pair to the with definition a link, otherwise of a Each pair of N labeled nodes random network (BOX 3.1): leave them disconnected is connected with probability 3) Repeat step (2) for each of the N(N-1)/2 p, a model introduced by Gil- A random network consists of N nodesnode wherepairs. each node pair is connect- bert [10]. ed with probability p. Network Science: Random Hence, the G(N, p) model fixes To construct a random network we follow these steps: the probability p that two nodes are connected and the G(N, L) 1) Start with N isolated nodes. model fixes the total number of links L. While in the G(N, L) 2) Select a node pair and generate a random number between 0 and 1. model the average degree of a If the number exceeds p, connect the selected node pair with a link, node is simply <k> = 2L/N, oth- otherwise leave them disconnected. er network characteristics are easier to calculate in the G(N, p) 3) Repeat step (2) for each of the N(N-1)/2 node pairs. model. Throughout this book we will explore the G(N, p) model, The network obtained after this procedure is called a random graph or not only for the ease that it al- a random network. Two mathematicians, Pál Erds and Alfréd Rényi, have lows us to calculate key network played an important role in understanding the properties of these net- characteristics, but also because works. In their honor a random network is called the Erds-Rényi network in real networks the number of (BOX 3.2). links is rarely fixed. RANDOM NETWORKS 4 Hence <L> is the product of the probability p that two nodes are con- nected and the number of pairs we attempt to connect, which is Lmax = N(N - 1)/2 (CHAPTER 2). Using (3.2) we obtain the average degree of a random network 2 L k ==pN(1− ). (3.3) N Hence <k> is the product of the probability p that two nodes are con- nected and (N-1), which is the maximum number of links a node can have in a network of size N. RANDOM NETWORK MODEL In summary the number of links in a random network varies between realizations. Its expected value is determined by N and p. If we increase p a random networkp=1/6 becomes denser: The average number of links increase N=12 linearly from <L> = 0 to Lmax and the average degree of a node increases from <k> = 0 to <k> = N-1. L=8 L=10 L=7 Figure 3.3 Random Networks are Truly Random Top Row Three realizations of a random network gen- erated with the same parameters p =1/6 and N = 12. Despite the identical parameters, the net- works not only look different, but they have a different number of links as well (L = 8, 10, 7). Bottom Row Three realizations of a random network with p = 1/6 and N = 100. RANDOM NETWORKS 7 THE NUMBER OF LINKS IS VARIABLE RANDOM NETWORK MODEL p=0.03 N=100 MATH TUTORIAL Binomial Distribution: The bottom line Network Science: Random Graphs Number of links in a random network P(L): the probability to have exactly L links in a network of N nodes and probability p: The maximum number of links in a network of N nodes = number of pairs of distinct nodes. ⎛ ⎞ ⎛ ⎞ ⎛ N ⎞ ⎜ N ⎟ ⎜ ⎟−L Binomial distribution... ⎜ ⎟ L ⎝ 2 ⎠ P(L) = ⎜ ⎝ 2 ⎠ ⎟ p (1− p) ⎜ ⎟ ⎝ L ⎠ Number of different ways we can choose L links among all potential links. ⎛ N ⎞ N(N −1) ⎜ ⎟ = ⎝ 2 ⎠ 2 Network Science: Random Graphs RANDOM NETWORK MODEL P(L): the probability to have a network of exactly L links ⎛ ⎞ ⎛ ⎞ ⎛ N ⎞ ⎜ N ⎟ ⎜ ⎟−L ⎜ ⎟ L ⎝ 2 ⎠ P(L) = ⎜ ⎝ 2 ⎠ ⎟ p (1− p) ⎜ ⎟ ⎝ L ⎠ • The average number of links <L> in a random graph N(N−1) 2 N(N −1) < L > < L >= ∑ LP(L) = p < k >= 2 = p(N −1) L= 0 2 N • The standard deviation N(N −1) σ2 = p(1− p) 2 Network Science: Random Graphs Section 3.4 Degree distribution DEGREE DISTRIBUTION OF A RANDOM GRAPH ⎛ N −1⎞ k (N 1) k P(k) = ⎜ ⎟ p (1− p) − − ⎝ k ⎠ probability of Select k missing N-1-k nodes from N-1 probability of edges having k edges 2 < k >= p(N −1) σk = p(1− p)(N −1) 1/ 2 σk ⎡1 − p 1 ⎤ 1 = ⎢ ⎥ ≈ 1/ 2 < k > ⎣ p (N −1)⎦ (N −1) As the network size increases, the distribution becomes increasingly narrow—we are increasingly confident that the degree of a node is in the vicinity of <k>. Network Science: Random Graphs DEGREE DISTRIBUTION OF A RANDOM GRAPH ⎛ ⎞ N −1 k (N−1)−k < k > P(k) = ⎜ ⎟ p (1− p) < k >= p(N −1) p = ⎝ k ⎠ (N −1) For large N and small k, we can use the following approximations: ⎛ N −1⎞ (N −1)! (N −1)(N −1−1)(N −1− 2)...(N −1− k +1)(N− 1− k)! (N −1)k ⎜ ⎟ = = = ⎝ k ⎠ k!(N −1− k)! k!(N −1− k)! k! < k > < k > k ln[(1− p)(N −1)−k ] = (N −1− k)ln(1− ) = −(N −1− k) = − < k > (1− ) ≅ − < k > N −1 N −1 N −1 ∞ n +1 2 3 (N−1)−k −<k> (−1) n x x (1− p) = e ln(1+ x) = ∑ x = x − + − ... for x ≤1 n=1 n 2 3 k k k k ⎛ N −1⎞ k (N−1)−k (N −1) k −<k> (N −1) ⎛ < k >⎞ −<k> −<k> < k > P(k) = ⎜ ⎟ p (1− p) = p e = ⎜ ⎟ e = e ⎝ k ⎠ k! k! ⎝ N −1⎠ k! Network Science: Random Graphs POISSON DEGREE DISTRIBUTION ⎛ ⎞ N −1 k (N−1)−k < k > P(k) = ⎜ ⎟ p (1− p) < k >= p(N −1) p = ⎝ k ⎠ (N −1) For large N and small k, we arrive to the Poisson distribution: < k >k P(k) = e−< k> k! Network Science: Random Graphs DEGREE DISTRIBUTION OF A RANDOM GRAPH k −<k> < k > <k>=50 P(k) = e k! P(k) k Network Science: Random Graphs DEGREE DISTRIBUTION OF A RANDOM NETWORK Exact Result Large N limit -binomial distribution- -Poisson distribution- (PDF) Probability DistributionFunction Image 3.4a Image 3.4b Anatomy of a binomial and a Poisson degree distribution. Degree distribution is independent of the network size. The exact form of the degree distribution of a random network is the The degree distribution of a random network with average degree ‹k› = 50 binomial distribution (left). For N » ‹k›, the binomial can be well approx- and sizes N = 102 , 103 , 104. For N = 102 the degree distribution deviates imated by a Poisson distribution (right). As both distributions describe significantly from the Poisson prediction (8), as the condition for the the same quantity, they have the same properties, which are expressed in Poisson approximation, N » ‹k›, is not satisfied. Hence for small networks terms of different parameters: the binomial distribution uses p and N as one needs to use the exact binomial form of Eq. (7) (dotted line). For N = its fundamental parameters, while the Poisson distribution has only one 103 and larger networks the degree distribution becomes indistinguishable parameter, ‹k›. from the Poisson prediction, (8), shown as a continuous line, illustrating that for large N the degree distribution is independent of the network size. In the figure we averaged over 1,000 independently generated random networks to decrease the noise in the degree distribution. 54 | NETWORK SCIENCE Section 3.4 Real Networks are not Poisson NO OUTLIERS IN A RANDOM SOCIETY Sociologists estimate that a typical person knows about 1,000 individuals on a first name basis, prompting us to assume that ‹k› ≈ 1,000. k àThe most connected individual has degree k ~1,185 < k > max P(k) = e−<k> k! à The least connected individual has degree kmin ~ 816 The probability to find an individual with degree k > 2,000 is 10-27.