1 Preliminaries

Although small-worlds networks have proved to be fertile ground for theoretical musing among mathematicians and scientists, the initial recognition and exploitation of the small-worlds phenomenon has far more empirical origins. The existence of such networks was first suggested by the Hungarian journalist and author Frigyes Karinthy in a short story published in 1929Footnote 1. In this story Karinthy asserts that, “using no more than five individuals”, an unbroken link of acquaintances can be established to connect any two people in the world. This is the source of the now-familiar notion of “six degrees of separation”. Although Karinthy offered anecdotal evidence for his assertion, forty years passed before Travers and Milgram provided empirical evidence for this assertion and coined the term “small worlds” [1]. The small-worlds property has since become a widely-used empirical tool for exploring the relational structures of a variety of social, biological, and physical systems. Such empirical studies have benefited greatly from the availability of massive data sets, among the largest of which is a snapshot of the approximately 700 million monthly active users of Facebook in 2011 (a figure that has since ballooned to 2.7 billion users in 2020) [2]. Not only does this social network exhibit the properties of a small world, it turns out that Facebook users on average have only four degrees of separation between one another [3]. Small world networks, and their associated properties manifest in a multitude of other contexts as well, with recent experience proving its relevance to epidemiology [4,5,6]. Similarly, many professional networks from Broadway [7] and Wall Street [8] to scientific collaborations [9] exhibit small world properties, encapsulated for mathematicians and theoretical physicists by their Erdös number, for example.

The first mathematical contribution to the small-worlds problem was provided in 1959 in the form of Erdös–Renyi random graphs [10], a class that was proposed independently by Gilbert [11]. Such graphs correspond to a set on N nodes where a link between any two chosen nodes will exist with probability p. Erdös–Renyi–Gilbert random graphs represent a limiting case of randomness in contrast to regular lattices, where links to nearest neighbors are to some extent guaranteed. On a regular lattice-like network, the average distance between any two nodes scales with some power the number of nodes, N, in the network. Along with other small-worlds networks,Footnote 2 Erdös–Renyi–Gilbert random graphs have the property that the distance between nodes is proportional to \(\log N\). Interpolating between these two extremes is a class of random networks introduced by Watts and Strogatz [14], for which a regular ring lattice with links to k nearest neighbors can have any given link reassigned to a random node with probability p. A variant of such networks was studied by Newman and Watts [15]. Instead of reassigning links, random links can be inserted between pairs of nodes. Both classes of models [14, 15] exhibit small-world scaling above a critical probability \(p\, {\sim }\, 1/N\). The regularity inherited from the original lattice before link reconnections or insertions are performed makes it possible to demonstrate small-world scaling analytically in the large N limit.

There is a qualitative distinction however between the small-world scaling seen in Erdös-Renyi-Gilbert and Watts-Strogatz classes of networks. The former exhibit a smaller clustering coefficient than the latter, whereas many real world examples of small-world networks exhibit large clustering coefficients [14]. Realizations of random networks that model a wider range of real systems can be obtained by specifying different degree distributions, by which one can analytically study the distribution of shortest path lengths [16,17,18,19,20], as well as the shell (i.e. differential) [21,22,23] and cycle structure [24]. In many contexts of interest, networks are not static entities but rather grow over time. Analytic studies of the distribution of shortest paths have also been made in the context of network growth via node duplication, as detailed in [25, 26].

Erdös–Renyi graphs are nevertheless useful in understanding the properties of real world networks through the variety of analytical results that can be proved for themFootnote 3. Perhaps the most celebrated of these is the critical probability found in the semi-regular network structure of [15] also exists in the purely random context [10, 11]. There exists a threshold value of \(p_c {\sim } 1/N\) above which statements about any representative graph are almost always true. It can be demonstrated, for example, that for \(p > (\log N)/N\) there will be a ‘giant component’ containing all nodes in the large N limit [10, 28, 29]Footnote 4. The emergence of such a hub structure is central to the small-world scaling of large networksFootnote 5. However, although one can demonstrate small-world scaling of the average distance between nodes, \(\ell \), in an Erdös–Renyi–Gilbert network in limiting cases where \(p \gg (\log N)/N\) (or vice versa), an analytic understanding of the approach to the transition point for \(\ell \) remains elusive.

Furthermore, although the semi-regularity of the Watts–Strogatz class of networks permits a continuum generalization for which a variant of the mean field approximation has been proposed [32], direct application of such methods fails for Erdös–Renyi–Gilbert graphs because of the lack of an underlying lattice sub-structureFootnote 6. In this paper, we present another variant of the mean field approximation, not predicated on a continuum generalization of the underlying graph structure that allows for an analytic demonstration of small world scaling in Erdös–Renyi–Gilbert random networks. In the case of Watts–Strogatz graphs [14, 15], the underlying lattice structure results in a phase transition at \(p = 1/N\) from an \(\ell \propto N\) scaling to an \(\ell \propto \log N\) scaling. For Erdös–Renyi–Gilbert graphs, the (percolation) transition occurs at a critical \(p_c = 1/N\) [34,35,36] and is of a somewhat different nature due to the absence of an underlying lattice. Here, the transition is from a regime characterized by the existence of multiple disconnected components of similar size (naturally identifiable as ‘domains’) to a regime dominated by a single giant connected component. Moreover, we can show that the mean field approximation fails close to the critical point between these two regimes even in the large N limit due to its inability to cope with the inherent inhomogeneities when the network exists in a phase composed of multiple disconnected components. However, the utility of the approximation described here, characteristic of any mean field approximation, is that it offers analytic understanding of a restricted class of phenomena. Fortunately, the emergence of small-world scaling away from the critical point is among them.

The assumption that all nodes in a network have the same probability of forming links is evidently an idealization of real networks in which some nodes can have an increased probability of forming links. This is the case, e.g., when considering co-author linkages within a given academic field. Paul Erdös had some 240 co-authors, which is unusually large in mathematics. The ability of such special nodes to reduce the path lengths was noted by Karinthy in 1929: “It’s always easier to find someone who knows a famous or popular figure than some insignificant person”. Fortunately, the mean field approximation is readily generalized to describe graphs containing such inequivalent nodes, and it will be shown that qualitatively new network behavior emerges from this extension. We consider a simple two family stochastic block variant of the Erdös–Renyi–Gilbert network, where links within a given family appear with fixed but distinct probabilities and links between the families appear with some finite probability and allowing for the relative sizes of these families to be arbitrary. This is not quite the widely studied planted partition stochastic block model, as we allow for the links within members of each family to appear with different probabilities, and so we will refer to this variant in what follows as a dimorphic network.

The dimorphic variant of the Erdös–Renyi–Gilbert network exhibits a richer phase structure than the standard case and is also accurately modelled by the mean field approximation provided that the network does not consist of “too many” disconnected components. One phase corresponds to the situation where the network factorizes into two strongly connected sub-networks with a limited number of ‘bridge’ links between them. The transition to this phase from a more homogeneous, but still disordered phase is roughly analogous to the spinodal decomposition of fluids. We also find that it is possible to induce small world behavior in a sub-network even if it does not meet the criteria to be in the small-world regime by itself, provided it connects to a sub-network that does. One can also envision a variant of the dimorphic network where the links within and between sub-networks have different weights. The formalism described here can readily be extended to describe such, and we shall pursue this possibility in subsequent investigations.

The remainder of this paper is organized as follows. In Sect. 2, we construct a formal generating functional for an arbitrary undirected weighted network, recovering the result that the associated free energy for an ensemble of Gilbert graphs corresponds to a system of non-interacting fermions residing at the edges. We also show how one can obtain formal expressions for ensemble averages of various network observables such as the average degree of the network, the degree distribution as well as the distance matrix. We note, however, that actually evaluating these quantities will be unduly cumbersome in practice. In Sect. 3 we introduce a mean field approximation that facilitates the evaluation of the ensemble average of the distance matrix for Erdös–Renyi–Gilbert networks and demonstrate that it accurately reproduces the small worlds scaling away from the critical edge probability \(p_* = (\log N)/N\). We show that this approximation fails as one approaches the latter critical point, and that this is to be expected since the network fragments into multiple domains. In Sects. 4 and 5, we generalize the mean field approximation to dimorphic networks and consider its different phases. The various technical details will be relegated to appendices. We offer concluding remarks in Sect. 6, where we discuss generalizations of the mean field approximation presented here to more general varieties of network disorder.

2 Random Networks from Random Matrices

Various properties of a network can be obtained from its associated adjacency matrix, A. All diagonal elements are 0. For unweighted networks, the off-diagonal element \({\textbf {A}}_{ij}\) is 1 if nodes i and j are connected by an edge and otherwise 0. For weighted networks the non-vanishing entries of \({\textbf {A}}_{ij}\) can be any real positive numberFootnote 7. Undirected networks have symmetric adjacency matrices; directed networks do not. It is clear that random networks can be described by the associated ensemble of random adjacency matrices defined by a particular probability measure.

Given a probability measure \(P({\textbf {A}})\) over the space of \(N\times N\) real matrices

$$\begin{aligned} {\int {\mathcal {D}} {\textbf {A}} P[{\textbf {A}}] = 1} \end{aligned}$$
(1)

where

$$\begin{aligned} {{\mathcal {D}}{} {\textbf {A}}P[{\textbf {A}}] := \prod _{i,j} d A_{ij} P_{ij},} \end{aligned}$$
(2)

we can define the generating functional

$$\begin{aligned} {Z[J] = \int {\mathcal {D}}{} {\textbf {A}}P[{\textbf {A}}] e^{-\mathrm{Tr\,}A J^T} }\end{aligned}$$
(3)

such that expectation values of arbitrary powers of the adjacency matrix can be obtained from successive derivatives of Z[J]

$$\begin{aligned} {\langle {\textbf {A}}^m_{ij} \rangle = (-1)^m\frac{\delta ^m Z[J]}{\delta J_{ii'}\delta J_{i'k}\ldots \delta J_{l l'}\delta J_{l'j} }\Bigg |_{J\equiv 0}.}\end{aligned}$$
(4)

The Gilbert–Erdös–Renyi model [11] corresponds to an unweighted, undirected network of N nodes, where a link between any two nodes occurs with a fixed probability p. The associated probability measure is given byFootnote 8

$$\begin{aligned} (i < j)~~~~~~ P_{ij}= & {} p\,\delta (A_{ij} - 1) + (1-p)\,\delta (A_{ij})\nonumber \\ (i = j)~~~~~~ P_{ij}= & {} \delta (A_{ii})\nonumber \\ (i > j)~~~~~~ P_{ij}= & {} \delta (A_{ij} - A_{ji}) \end{aligned}$$
(5)

Computation of the generating functional Z[J] for any given probability measure is straightforward since the measure and the source term factorize as

$$\begin{aligned} {Z[J] = \prod _{i,j}\int \,d A_{ij}\, P_{ij}e^{- A_{ij}J_{ij}}\ .}\end{aligned}$$
(6)

It follows directly from Eq. (5) that

$$\begin{aligned} {Z[J] = (1-p)^{\frac{N(N-1)}{2}}\prod _{i < j}\left[ 1 + e^{-\left( \lambda + J_{(ij)}\right) } \right] ;~~~\lambda := - \log \left( \frac{p}{1-p}\right) ,~J_{(ij)} := J_{ij} + J_{ji}\ .} \nonumber \\ \end{aligned}$$
(7)

We can also define the generating function, W[J], for all connected correlation functions as

$$\begin{aligned} {e^{-W[J]} := Z[J]}\end{aligned}$$
(8)

which from Eq. (7) is given by

$$\begin{aligned} {W[J] = \frac{N(N-1)}{2}\log \left( \frac{1}{1-p}\right) - \sum _{i < j} \log \left[ 1 + e^{-(\lambda + J_{(ij)})} \right] .}\end{aligned}$$
(9)

Since the pre-factor in Eq. (7) serves only to normalize \(Z[0] = 1\), it can be discarded provided that all moments are obtained by dividing Eq. (4) by Z[0]. The generating function for Gilbert random graphs then becomes

$$\begin{aligned} {Z[J] = \prod _{i < j}\left[ 1 + e^{-\left( \lambda + J_{(ij)}\right) } \right] \ \mathrm{with}\ \lambda := - \log \left( \frac{p}{1-p}\right) \ \ \mathrm{and}\ \ J_{(ij)} := J_{ij} + J_{ji}}\end{aligned}$$
(10)

with a corresponding free energy W[J] given by

$$\begin{aligned} {W[J] = - \sum _{i < j} \log \left[ 1 + e^{-(\lambda + J_{(ij)})} \right] \ .}\end{aligned}$$
(11)

We note that the above corresponds to the free energy for an ‘exponential random graph’ obtained from a probability measure that maximizes the Gibbs entropy subject to a particular set of constraints [37]. As noted in [37], the partition function Eq. (10) and free energies Eq. (11) correspond to a system of non-interacting fermions localized on the links. This is made even more apparent when one calculates the one particle occupation numbers:

$$\begin{aligned} {-\frac{1}{Z}\frac{\delta Z}{\delta J_{ij}}\Bigg |_{J\equiv 0} = n_{ij} = \frac{1}{e^\lambda + 1} = p\ .}\end{aligned}$$
(12)

Taking the appropriate derivatives of Eq. (10) with respect to the source components \(J_{ij}\), one can obtain ensemble averages of any network observable that can be expressed in terms of the adjacency matrix. In the case of unweighted networks for instance, the average number of paths of length k connecting nodes i and j, defined as \(\#_{ij}(k)\) is given precisely by Eq. (4):

$$\begin{aligned} {\#_{ij}(k) = \langle {\textbf {A}}^k_{ij} \rangle .}\end{aligned}$$
(13)

The degree of the ith node in any given network realization is given by the bilinear form \((e_i,{\textbf {A}} u)\) where \(e_i\) is the ith unit vector, and where \(u = \sum e_j\) is the vector with 1 in all of its entries. Therefore the ensemble averaged degree of the ith node, defined as \(k_i\), is given by

$$\begin{aligned} {k_i = \langle (e_i,{\textbf {A}} u)\rangle = \sum _{j=1}^N \langle {\textbf {A}}_{ij} \rangle \ .}\end{aligned}$$
(14)

Note that this need not be the same for all i as the \(P_{ij}\) in Eq. (2) need not be the same for all links connecting nodes ij. The average degree of the entire network, \(\langle k \rangle \), can be obtained as

$$\begin{aligned} {\langle k \rangle = \frac{1}{N}\langle (u,{\textbf {A}} u)\rangle = \frac{1}{N}\sum _{i,j=1}^N \langle {\textbf {A}}_{ij} \rangle \ .}\end{aligned}$$
(15)

The analogs of the above expressions for general heterogeneous networks can also be found, for instance in Refs. [38, 39].

The average value of the shortest path length between any two nodes is of particular interest in this investigation. This first requires us to specify the notion of a distance on a network. For a general weighted network, a natural (although by no means unique) choice is provided by the analog of effective conductance in an electrical circuit [40]:

$$\begin{aligned} {D_{ij} = \min \left\{ \left( \frac{1}{A_{ih}} + \cdots + \frac{1}{A_{hj}} \right) \right\} }\end{aligned}$$
(16)

where the sum includes all possible paths connecting nodes i and j. For the unweighted networks to be considered here, this reduces to the usual notion of the minimum number of links connecting nodes i and j. In this case, the diagonal elements of the distance matrix D are defined as 0, and the off-diagonal elements are smallest number of links connecting any pair of nodes (which can be infinite if no such path exists). The average distance between any two nodes is thus given by

$$\begin{aligned} {\ell = { N\atopwithdelims ()2}^{-1} \sum _{i<j} \langle {\textbf {D}}_{ij}\rangle = { N\atopwithdelims ()2}^{-1}\langle (u,{\textbf {D}} u)\rangle \ .}\end{aligned}$$
(17)

Proving the small worlds property for a given class of random networks thus consists in proving the limiting behavior

$$\begin{aligned} {\lim _{N\rightarrow \infty } \ell = \lim _{N\rightarrow \infty } { N\atopwithdelims ()2}^{-1}\sum _{i<j} \langle {\textbf {D}}_{ij}\rangle \rightarrow \log N\ .}\end{aligned}$$
(18)

Depending on the particular realization of network randomness, the resulting distance matrix can prove to be disconnected. This means that \({\textbf {D}}\) can be brought into block diagonal form by a similarity transform involving a permutation matrix The individual blocks will correspond to connected component graphs, and the off-diagonal block entries will be infinite. In such cases, it seems natural to define an average distance exclusively on the basis of sums performed within the distinct connected components.

There are a variety of algorithms for obtaining the distance matrix of a particular network given its adjacency matrix, for instance Dijsktra’s algorithm and its variants [41]. In the special case of an unweighted network, however, one can also obtain a formal expression for the distance matrix in terms of the adjacency matrix. Given that the \(k{\mathrm{th}}\) power of the adjacency matrix has entries \({\textbf {A}}^k_{ij}\) that count the number of paths of length k between nodes i and j, the shortest distance between any two nodes ij is given by the first power k for which \({\textbf {A}}^k_{ij} \ne 0\). Therefore,

$$\begin{aligned} {{\textbf {D}}_{ij} = \min \{k\,|\, {\textbf {A}}^k_{ij} > 0\} }\end{aligned}$$
(19)

An analytic approximation to the minimum function (exact in the limit \(\Lambda \rightarrow \infty \)) is given by

$$\begin{aligned} {{\textbf {D}}_{ij} = \lim _{\Lambda \rightarrow \infty } -\frac{1}{\Lambda } \log \sum _{q=1}^\infty \Theta ({\textbf {A}}^q_{ij} - 1/2)\,e^{-\Lambda q} }\end{aligned}$$
(20)

where the offset of the Heaviside step function could be any real number between 0 and 1. In particular, we wish to calculate the ensemble expectation value of the above expression, that is

$$\begin{aligned} {\langle {\textbf {D}}_{ij}\rangle = \lim _{\Lambda \rightarrow \infty } -\frac{1}{\Lambda } \langle \log \sum _{q=1}^\infty \Theta ({\textbf {A}}^q_{ij} - 1/2)\, e^{-\Lambda q} \rangle \ .}\end{aligned}$$
(21)

As it stands, Eq. (21) is calculationally cumbersome. It is tempting to bring the expectation value in Eq. (21) inside the logarithm by perhaps assuming that network disorder is “annealed”, or (by some abuse of terminology) invoking a variant of the replica trick [42, 43]. It is unclear if either assumption is justified. Moreover, with the exception of Edwards-Anderson type (Gaussian) disorder for weighted networks [43] [requiring the more general metric Eq. (16)], it is unclear if any calculational advantage is to be gained. Rather, in the next section we will suggest a way to approximate the above for the special case of unweighted networks using a particular variant of the mean field approximation.

3 Small Worlds—A Mean Field Description

In this section we consider a “mean field” description of Gilbert–Erdös–Renyi random networks. Although this description is not exact, it will be seen to provide a semi-quantitative description of their properties. For the case of unweighted networks, we see from Eq. (19) that the elements of the distance matrix \({\textbf {D}}_{ij}\) give the length of the shortest path between nodes i and j. This is simply the smallest integer k such that \({\textbf {A}}^k_{ij}\) is non-zero. It should be clear that no such shortest path can involve any repeated indices in the product of the k adjacency matrices since this would correspond to backtracking over a previous step. The determination of the distribution of shortest path lengths involves two steps. First, we must determine the probability that \({\textbf {A}}^k_{ij}\) is non-zero for a given value of k. This is given as one minus the probability that \({\textbf {A}}^k_{ij}\) vanishes subject to the constraint that there are no repeated indices in the intermediate summations within the matrix product. One simply computes the probability that the string \(A_{i i_1}A_{i_1 i_2}\ldots A_{i_{k-1}i_k}\) vanishes, where \(i_1 \ldots i_{k-1}\) are summed over subject to the constraint that no index is repeated. From this, one sees immediately that the probability, \(p_k\), that there will be a shortest, non-backtracking pathFootnote 9 of length k between the nodes ij is given by

$$\begin{aligned} {p_k = 1 - (1 - p^k)^{\gamma _k}}\end{aligned}$$
(22)

where

$$\begin{aligned} {\gamma _k = (N-2)!/(N-k-1)! \ .}\end{aligned}$$
(23)

The probabilities \(p_k\) represent a true ensemble average for the unweighted network . The second part of the calculation requires us to modify the \(p_k\) by imposing the constraint that there is no path of length less than k that connects the nodes in question. Since it is difficult to impose this constraint exactly, we will proceed as follows. The ensemble average probability, \(q_k\), that there does not exist a shortest path of length k is \(1 - p_k\). Using this ensemble averaged quantity, the probability that the shortest path will be exactly of length k (and no shorter), denoted as P(k) can be estimated as

$$\begin{aligned} {P(1) = p, {~~\mathrm and~~} P(k) = p_k \prod _{n=1}^{k-1}q_n,~~ 1< k < N.}\end{aligned}$$
(24)

We note that there is also some probability, \(P_{\infty }\), that there will be no path of any length connecting two nodes. This probability is readily seen to be

$$\begin{aligned} {P_{\infty } = \prod _{n=1}^{N-1}\, q_n.}\end{aligned}$$
(25)

As we shall see shortly, this quantity is directly relates to the size of the largest connected component (c.f. the quantity \(F_\infty \) in [23]). With the inclusion of this additional term (which can be 0), the probability distribution function (PDF) will have the correct normalization

$$\begin{aligned} {\sum _{k=1}^{N-1} P(k) + P_\infty = 1.}\end{aligned}$$
(26)

These results would be exact if the matrices \({\textbf {A}}^k\) for various values of k were uncorrelated. Unfortunately, this is not the case. The operation of ensemble averaging does not commute with other aspects of the computation and should be performed last. It is thus an approximation to make use of ensemble averaged values of \(q_k\) in the calculation of the P(k), and it remains to be seen whether this approximation is reliableFootnote 10. We note, however, the strong similarity of this approximation to the mean field approximation familiar from statistical mechanics and many-body physics. Mean field results can be useful provided that the system is homogeneous with correlations/fluctuations that are sufficiently small. Determination of the degree of reliability of mean field results in the present case will require comparison with simulations.

In the following examples of mean field results and their comparison with the results of simulations, we will consider the choice

$$\begin{aligned} {p = \frac{\kappa }{N-1}.}\end{aligned}$$
(27)

This is motivated by our wish to model systems for which the properties of the individual nodes (e.g., the average number of links per node, \(\kappa \)) are independent of the size of the system. Although more elaborate choices of p might be appropriate for specific systems, their adoption would require physical justifications that are beyond the scope of our investigation. The simulations were done over ensembles consisting of \(10^2\) samples, and converge rapidly away from the critical point.

Fig. 1
figure 1

Mean field values of P(k) with \(p = 3/(N-1)\) for \(N = 10^4\) (blue dotted), \(10^6\) (blue dashed), and \(10^8\) (black). Using Eq. (31) we find that \(x_\mathrm{mode} = 7.93, 12.12\) and 16.32 respectively, consistent with \(k_\mathrm{mode}\) being identified by \([x_\mathrm{mode}]_\pm \) as discussed below Eq. (31)

Figure 1 shows the values of P(k) determined by Eqs. (22)–(24) for several values of N. Consistent with small-worlds expectations, the peak of the distribution increases logarithmically with N and its width is roughly independent of N. Thus, relevant features of this distribution can be determined from a number of terms proportional to \(\log N\). Although we have verified the validity of the mean field approximation for different values of N up to \( N = 10^3\), note that it very challenging to perform simulations for values of N as large as those shown in Fig. 1. This figure provides a strong indication of small worlds behavior for this choice of \(\kappa \), although we shall see below that this result is not true in general.

An analytic expression of how the mean field description captures these essential features of the distribution of path lengths can be obtained by considering the maximum value (i.e., the mode) of the P(k) distribution for large N. In fact, this expression will also tell us when we are in the small-worlds domain. From Eq. (24) we see that

$$\begin{aligned} {\frac{P(k+1)}{P(k)} = p_{k+1}\left( \frac{1}{p_k} - 1\right) .}\end{aligned}$$
(28)

The distribution will have an extremum whenever this ratio is equal to one. Imposing this condition implies that

$$\begin{aligned} {1 = \left[ 2 - (1 - p p^k)^{\gamma _k (N-k-1)}\right] (1 - p^k)^{\gamma _k}\,.}\end{aligned}$$
(29)

Replacing k with the continuous variable x, using the analytic approximation \(\Gamma (N + \alpha )/\Gamma (N) \rightarrow N^\alpha \) as \(N\rightarrow \infty \), and using the fact that, for example,

$$\begin{aligned} (1 - p^{x+1})^{\gamma _{x+1}} \approx e^{-\gamma _{x+1}p^{x+1}}\ \ \mathrm{for}\ \ p < 1\ , \end{aligned}$$

we see that Eq. (29) is equivalent to the condition

$$\begin{aligned} {1 = \frac{1}{2}\left( e^{\frac{\tau }{\kappa }} + e^{-\tau } \right) \ \ \mathrm{with}\ \ \tau = p\kappa ^x = \frac{\kappa ^{x+1}}{N-1}\ .}\end{aligned}$$
(30)

Numerically evaluating the root of the above for \(\tau \) as a function of \(\kappa \), and solving for x which we identify as \(x_\mathrm{mode}\) results inFootnote 11

$$\begin{aligned} {x_\mathrm{mode}(\kappa ,N) = \frac{1}{\log \kappa } \log (N-1) + \frac{1}{\log \kappa }\log r(\kappa ) - 1,~~~~ k_\mathrm{mode} = [x_\mathrm{mode}]_\pm }\end{aligned}$$
(31)

where \(r(\kappa )\) is the root of Eq. (30). Given that k is a discrete variable, whose continuous generalization x attains a maximum at some value, the most we can conclude is that \(k_\mathrm{mode}\) is either of the nearest integers rounded up or down around the value obtained from Eq. (31), denoted \([x_\mathrm{mode}]_\pm \). As seen in Fig. 1, this provides a reasonably accurate determination of the mode of the PDF given by Eq. (24). Note, however, the singular behaviour of \(k_\mathrm{mode}\) when the average number of links per node is \(\kappa \le 1\). This is related to the fact that, for sufficiently small \(\kappa \), the P(k) decrease monotonically with k and no local maximum exists, due to the fragmentation of the network into disconnected components. Moreover, we note that Eq. (31) diverges as \(1/(\kappa - 1)\) as \(\kappa \rightarrow 1\) from above, in agreement with the divergence found for the mean path lengths in [31].

Fig. 2
figure 2

\(P_{\infty }\) as a function of \(\kappa \) for \(N =\) 100 (dotted), 250 (dashed) and 2500 (solid)

To see this more clearly, Fig. 2 shows the dependence of \(P_{\infty }\) on the average number of links per node, \(\kappa \), as determined by the mean field result Eq.  (25). As one passes through the critical edge probability \(p_* = (\log N)/N\) (which we rederive shortly), mean field results suggest that the composition of the network undergoes a significant change – an expected result from the perspective of percolation theory [34,35,36]. For \(p > p_*\), essentially all nodes are linked to one another in a genuine small world state. For \(p < p_*\) the network exists in a phase composed of a multitude of clusters of small size. In such a phase, there will be a significant number of nodes that are not linked. In other words, the mean field approximation predicts that \(P_{\infty } \rightarrow 1\) for \(\kappa \ll 1\) and \(P_{\infty } \rightarrow 0\) for \(\kappa \gg 1\). The mean field values of \(P_{\infty }\) are shown in Fig. 2 as a function of \(\kappa \) for several values of N. We see from the figure that this transition becomes increasingly sharp with increasing N. It is tempting to regard \(P_\infty \), or rather \((1 - P_\infty )^{1/2}\) as an order parameter and to view this as a mean field indication of a phase transition at \(\kappa = 1\). However, mean field descriptions of phase transitions are known to be incorrect for many systems (e.g., the Ising model in one and two dimensions) as a consequence of its failure to account for significant fluctuations near a critical point, rendering meaningless any simple averaged descriptions of the system. In fact, we are obliged to consider an entirely different quantity not obtainable from our mean field approximation (although well understood in the context of percolation theory [35, 36]) as the order parameter pertaining to the phase transition in Erdös–Renyi–Gilbert random networks. We identify this order parameter in the next subsection, and turn to the question of how to interpret the mean field approximation in addition to comparing with simulations.

3.1 Mean Fields and Simulations

Before comparing the mean field results with simulations, we first consider the probability that a given node is a “hermit” with no links to any of the remaining \((N-1)\) nodes, which is one of the few results that can be determined exactly without the necessity of simulations. This probability is given by \((1 - p)^{N-1}\), or

$$\begin{aligned} {\left( 1 - \frac{\kappa }{N-1} \right) ^{N-1},}\end{aligned}$$
(32)

which approaches \(\exp [-\kappa ]\) in the limit of large N. This is an exact statement valid for all \(\kappa \) and N. Evidently, the number of nodes which have no connection with the largest small-worlds cluster must be greater than or equal to the number of such hermits. The latter can be similarly estimated via the assumption that for large enough N, the fraction of nodes contained in the largest cluster does not depend on N (although it does depend on \(\kappa \)). Denoting this fraction as \(f_\mathrm{cluster}\), we realize that if we were to add one more node and if \(f_\mathrm{cluster}\) is to remain unchanged, the probability that this new node not belong to the largest cluster must be \(1 - f_\mathrm{cluster}\). That is

$$\begin{aligned} {\left( 1-\frac{\kappa }{N-1}\right) ^{N f_{\text{ cluster } }}=1-f_{\text{ cluster } },}\end{aligned}$$
(33)

which in the large N limit implies

$$\begin{aligned} {f_{\text{ cluster } }=1-\exp \left[ -\kappa f_{\text{ cluster } }\right] .}\end{aligned}$$
(34)

This is in fact the order parameter relevant to the percolation phase transition in Erdös–Renyi–Gilbert random networks [34,35,36]. Unfortunately, this is not obtainable from our mean field approximation, which focuses on the links of the network as opposed to the number of nodes in the largest cluster. We note that Eq. (34) has only the trivial solution \(f_\mathrm{cluster} = 0\) for \(\kappa < 1\), whereas it also admits a non-trivial positive solution for \(\kappa \ge 1\), which also depicts simulations of the largest cluster size. Eq. (34) has the formal solution [30]

$$\begin{aligned} {f_\mathrm{cluster} = 1 + \frac{1}{\kappa }W\left( -\kappa e^{-\kappa }\right) ,}\end{aligned}$$
(35)

where W(z) is the Lambert W functionFootnote 12. However, by considering the quantity \({{\bar{f}}}_\mathrm{cluster} = 1 - f_\mathrm{cluster}\) and defining \(\kappa = \log N\), one can rewrite Eq. (34) as

$$\begin{aligned} {{{{\bar{f}}}_\mathrm{cluster}}=\frac{1}{N} N^{{{{\bar{f}}}_\mathrm{cluster}}}.}\end{aligned}$$
(36)

Starting with \({{\bar{f}}}_\mathrm{cluster} = 0\) and iterating the equation repeatedly, one obtains a power series expansion in \((\log N)/N\) and read off the general series coefficients to obtain the exact solution

$$\begin{aligned} { {\bar{f}}_\mathrm{cluster } = \frac{1}{N}+\frac{1}{N} \sum _{k=1}^{\infty } \frac{(k+1)^{k-1}}{k !}\left( \frac{\log N}{N}\right) ^{k}, }\end{aligned}$$
(37)

from which it is clear that \({{\bar{f}}}_\mathrm{cluster} \rightarrow 0\), or \(f_\mathrm{cluster} \rightarrow 1\) as \(N \rightarrow \infty \).

Fig. 3
figure 3

Comparison of \(f_\mathrm{cluster}\) (black curve) with the commensurate mean field order parameter \((1 - P_\infty )^{1/2}\) for \(N=10^2\) (brown) and \(N=10^4\) (orange)

In order to compare the percolation order parameter \(f_\mathrm{cluster}\) with the mean field order parameter \(P_\infty \), we realize that in the large N limit, the fraction of connected pairs of nodes is approximated to leading order by \(f^2_\mathrm{cluster}\). Hence, the fraction that are not connected is given by \(1 - f^2_\mathrm{cluster}\). Thus, by comparing \((1 - P_\infty )^{1/2}\) to \(f_\mathrm{cluster}\), one can make a fairer determination as to whether the mean field order parameter accurately captures the nature of the phase transitionFootnote 13. As can be seen from Fig. 3 we see that the mean field results appear to get the nature of the phase transition wrong by suggesting a first-order transition (given the evident discontinuity developing in the thermodynamic limit) rather than the second-order transition suggested by the analytic approximation for \(f_\mathrm{cluster}\). This failure of the mean field approximation is neither surprising nor alarming, and merely highlights its expected failure whenever fluctuations invalidate the mean field treatment. Nevertheless, the approximation ought to improve rapidly as one moves away from the critical point, which we now investigate numerically. It should come as no surprise that when the network consists of a giant connected component, the mean field approximation works well given the high dimensionality of system set by N.

Fig. 4
figure 4

Comparison of simulated network (orange dashed) with the normalized mean field approximation (gray) and the exact answer given by Eq. (38) (black dashed, indiscernible from mean field result) for \(p = 0.3/(N-1)\); \(N = 500\). Graph on left is a representative draw from the ensemble

Fig. 5
figure 5

Comparison of simulated network (orange dashed) with the mean field approximation (gray) for \(p = 1.5/(N-1)\); \(N = 500\). Graph on left is a representative draw from the ensemble

Fig. 6
figure 6

Comparison of simulated network (orange dashed) with the mean field approximation (gray) for \(p = 3.0/(N-1)\); \(N = 500\). Graph on left is a representative draw from the ensemble

We performed a series of simulations of the PDF for the quantities P(k) that describe the probability that the shortest path between two nodes will be of length k. The results of such a check are shown in Figs. 4, 5 and 6 for an ensemble size of a 100 samples of a system of \(N = 500\) nodes with \(\kappa \) of 0.3, 1.5, and 3.0, respectively. Here, we have chosen to neglect the single term \(P_{\infty }\). Thus, the final term in Eq.  (26) has been neglected and the remaining terms renormalized so that their sum is 1. For the cases \(\kappa = 0.3\) and 3.0, the system is expected to be relatively homogeneous. In the former case, \(\kappa \) is simply too small for large clusters and thus large distances, k, to form. Although \(P_{\infty }\) is not negligible, it has no effect other than the renormalization of the P(k) shown in the figure. In the latter case, we have seen that the largest cluster is formed predominantly by the merger of smaller clusters. As can be seen from Eq. (32), all that remains is a small (i.e., \(\exp [-\kappa ]\)) fraction of isolated nodes in the large N limit. In both cases, the resultant homogeneity of the networks is relatively high, and the agreement between mean field and simulated results is reasonably good. In fact, for the sub-critical value of \(\kappa = 0.3\), the exact distribution of shortest paths is known to be exponential, and given by [31]

$$\begin{aligned} {P(k) = (1-\kappa )\kappa ^{k-1},}\end{aligned}$$
(38)

where we see from Fig. 4 that the mean field is in excellent agreement with the former. That the simulation differs is an artifact of the finite size of the simulated system.

The case shown in Fig. 5 is rather different since the value of \(\kappa = 1.5\) has been chosen so that the largest cluster in the simulation contains half of the nodes. The ensemble of adjacency matrices is expected to be maximally heterogeneous with considerable differences between its various elements. In short, the mean field description should be at its worst. Specifically, we should expect that the root-mean-square (rms) deviation of the P(k) should be relatively large and that the agreement with mean field results should be rather poor.

To conclude this section, we have presented a mean field description of the properties of an ensemble of randomly drawn adjacency matrices. This description is sufficiently simple to be applied to networks of size \(10^7\) or larger. It correctly describes the qualitative transition of the system from an set of unconnected nodes to one dominated by a single small-worlds connected network containing an increasing fraction of nodes as the number of links per node grows. This result was obtained by making the conservative assumption that the average number of links per node, \(\kappa \), is independent of the size of the system, N. Any monotonic growth in \(\kappa \) as a function of N would necessarily result in a genuine small world involving the participation of all nodes in the thermodynamic limit \(N \rightarrow \infty \). Since many popular models build in small worlds behaviour by construction, we consider it appealing that random networks show similar behaviour generically. As expected, the mean field description fails to capture the true nature of the small world phase transition. Nevertheless, its description of the distribution of the distances between nodes appears to be quite reliable for all values of \(\kappa \) considered here. Thus, it is with some confidence that we can now turn to the more challenging and potentially more interesting topic of small worlds and dimorphic networks.

4 Dimorphic Networks

figure a

We now consider a two family stochastic block model in which m out a total of N nodes form links with each other with probability \(p_s\) while the remaining \(N-m\) nodes form links with each other with probability \(p_w\). A planted partition model would correspond to the situation where \(p_s = p_w\), and the balanced planted partition model would correspond to the situation where furthermore, \(m = N/2\) [45]. The probability that a link is formed between nodes in different families is \(p_I\). That is, the network factorizes into two independent Erdös–Renyi–Gilbert sub-networks with associated probabilities \(p_s\) and \(p_w\) respectively, with bridge links between the sub-networks appearing with probability \(p_I\). The subscripts s and w (strong and weak) are meant to suggest our eventual interest in the regime where one family is much more strongly connected than the other, although in what follows we allow them to be arbitraryFootnote 14.

It is convenient to partition the index \(i \subset \{1,\ldots ,N\}\) into lower case Latin \(a \subset \{1,\ldots ,m\}\) for nodes in the ‘strong’ family and Greek \(\alpha \subset \{m+1,\ldots ,N\}\) for nodes in the ‘weak’ family, so that the corresponding random adjacency matrix is given by

$$\begin{aligned} p(A_{ab} = 1)= & {} p_s \nonumber \\ p(A_{a\alpha } = 1)= & {} p_I \nonumber \\ p(A_{\alpha \beta } = 1)= & {} p_w\ . \end{aligned}$$
(39)

The generalization of the mean field approximation to the dimorphic network consists of calculating the probability that the shortest paths between two nodes ij will be of length k. For \(k=2\) this can be done straightforwardly:

$$\begin{aligned} p(A^2_{ab} = 0)= & {} (1 - p_s^2)^{m-2}(1 - p_I^2)^{N-m}\nonumber \\ p(A^2_{a\beta } = 0)= & {} (1 - p_sp_I)^{m-1}(1 - p_Ip_w)^{N-m - 1}\nonumber \\ p(A_{\alpha \beta } = 0)= & {} (1 - p_I^2)^{m}(1 - p_w^2)^{N-m-2}\ . \end{aligned}$$
(40)

In order to proceed for \(k > 2\), it is useful to note that, for a string of adjacency matrix elements with the summation over the indices yet to be performed, the probability that this string vanishes is given by

$$\begin{aligned} { p(A_{ij_1}A_{j_1j_2}\ldots A_{j_{k-2}j_{k-1}}A_{j_{k-1}j} = 0) = 1 - p_s^{\alpha _0}p_w^{\alpha _1}p_I^{k - \alpha _0-\alpha _1}~~~~(\text {no summation over indices})}\end{aligned}$$
(41)

where \(\alpha _0\) counts the number of times a pair of indices are both draw from the set \(\{a\}\) and \(\alpha _1\) counts the number of times a pair of indices are both draw from the set \(\{\alpha \}\). Therefore, the probability that there is a shortest path of length k between any two nodes ij is given by

$$\begin{aligned} {p_{k, {\{s, I, w\}}} = 1 - \prod _{\alpha _0 = 0}^{k}\prod _{\alpha _1 = 0}^{k - \alpha _0}\left( 1 - p_s^{\alpha _0}p_w^{\alpha _1}p_I^{k - \alpha _0 - \alpha _1}\right) ^{\Gamma ^{k,\{s, I, w\}}_{\alpha _0\alpha _1}} }\end{aligned}$$
(42)

where the subscripts \(\{s, I, w\}\) denote whether the pair of nodes ij are both in set a, have mixed indices \(a,\beta \) or are both in \(\alpha \) respectively, and \(\Gamma ^{k,\{s, I, w\}}_{\alpha _0\alpha _1}\) counts the number of distinct ways in which the combination \(\alpha _0, \alpha _1\) appears in the sum without any repeated indices. The challenge is to calculate the combinatorial factors \(\Gamma ^{k,\{s, I, w\}}_{\alpha _0\alpha _1}\) (see Appendix C), to determine the quantities \(q_{k,s} := 1 - p_{k,s}\) etc. and to construct the analogues of Eq. (24)

$$\begin{aligned} {P_{s}(k) := p_{k,s}\prod _{j=1}^{k-1} q_{j,s}~~~ 1< k < N,}\end{aligned}$$
(43)

with similar expressions for \(P_{I}(k)\) and \(P_{w}(k)\). These correspond to the probability that there will be a shortest path of length k beginning and ending in the strong linked sub-network (\(P_{s}\)), beginning and ending in the weak linked sub-network (\(P_{w}\)) or beginning in one and ending in the other (\(P_{I}\)). (The construction of these three quantities—the dimorphic analogues of the mean field approximation to the P(k) given by Eq. (24)—is presented in Appendix B.) As we note in the appendix, the calculation of the requisite combinatorial factors above maps onto the problem of computing the numbers of consecutively aligned spins on a finite spin chain with fixed boundary conditions. As we show in the next section, dimorphic networks evidently exhibit a rich phase structure. This includes a phase where small worlds behavior is induced in the weakly connected sub-network even if it is not itself within the small-worlds regime.

5 Phases of Small Worlds in Dimorphic Networks

In the following, we consider the dimorphic network to consist of a ‘strong’ sub-network with \(p_s\) well within what would be the small-world regime if it were an independent network and vary \(p_w\) and \(p_I\). We find three distinct phases for the network which can be classified as disordered small worlds, spinodal small worlds, and induced small worlds. For each of these, we compare the results of simulations with our mean-field approximation, which as we shall see, remains accurate in these distinct phases provided the network as a whole does not decompose into too many disconnected components. In what follows, we consider the natural parameterization for dimorphic network probabilities

$$\begin{aligned} {p_s := \frac{\kappa _s}{m},~~ p_w := \frac{\kappa _w}{N-m},~~ p_I := \frac{\kappa _I}{N-m},}\end{aligned}$$
(44)

where, as above, the full network consists of N nodes, the strong sub-network contains m nodes, and the weak sub-network contains \(N-m\) nodes.

5.1 Disordered Small Worlds

In this regime, we consider \(\kappa _s \ne \kappa _w \ne \kappa _I\) such that individually, each \(\kappa _{i} \gtrsim 2\), chosen to keep the network fragmentation to a minimum to ensure the validity of the mean-field approximation. In Fig. 7, we see that the mean-field approximation accurately compares to simulations. By varying N, one also finds the small world scaling of paths that begin and end with a given sub-network, or beginning in one and ending in another. The distinction between the sub-networks is not particularly relevant in this regime, and one can consider this network globally as a disordered small world, as can readily verified by increasing N and m.

Fig. 7
figure 7

Comparison of simulations (orange dashed) with the mean field approximation (gray): \(P_{s}(k), P_{I}(k)\) and \(P_{w}(k)\) for \(\kappa _s = 5\), \(\kappa _w = 2\) and \(\kappa _I = 3\) for \(m = 20, N = 500\). Depicted below are two representative largest connected component draws from the simulation ensemble

5.2 Spinodal Small Worlds

In this regime, we consider \(\kappa _s, \kappa _w \gtrsim 2\), with \(\kappa _s, \kappa _w \gg \kappa _I > \kappa _{I_\mathrm{\, crit}}\), where we have defined

$$\begin{aligned} {\kappa _{I_\mathrm{\, crit}} = \frac{1}{m}.}\end{aligned}$$
(45)

With these parameters, the network decomposes into two strongly connected sub-networks with a small number of bridge links between them. The critical value for \(\kappa _I\) can be understood as the value much below which the strong and weak sub-networks fail to form any links between them. Precisely at the critical value, any given realization of the network will be as likely as not to form bridge links between the strong and weak sub-networks. Were one to begin in the disordered small-worlds regime and decrease \(\kappa _I\) until it is much less than \(\kappa _s\) and \(\kappa _w\), but still greater than \(\kappa _{I_\mathrm{\, crit}}\), the network would undergo a transition roughly analogous to spinodal decomposition in a fluid, wherein two phases co-exist and the transition occurs instantaneously due to the absence of any nucleation or latent energy difference between the two phases.

We again compare the results of our mean-field approximation to simulations in Fig. 8, where we find good agreement for the mean and modes of the distributions. By virtue of the bridge links, one finds small world scaling in the spinodal regime for each type of path – whether beginning or ending in a given sub-network, or beginning in one and ending in another, as depicted in Fig. 9. Here, the ratio m/N is kept fixed as N is increased.

Fig. 8
figure 8

Comparison of simulations (orange dashed) with the mean field approximation (gray): \(P_{s}(k), P_{I}(k)\) and \(P_{w}(k)\) for \(\kappa _s = 7\), \(\kappa _w = 5\) and \(\kappa _I = 0.2\) for \(m = 20, N = 500\). Depicted below are two representative largest connected component draws from the simulation ensemble

Fig. 9
figure 9

Scaling of \(P_{s}(k)\) (blue dotted), \(P_{I}(k)\) (blue dashed) and \(P_{w}(k)\) (black) for \(\kappa _s = 7\), \(\kappa _w = 5\) and \(\kappa _I = 0.2\) for \(m = 2\times 10^3, N = 5\times 10^4\) (left) and \(m = 2\times 10^5, N = 5\times 10^6\) (right)

5.3 Induced Small Worlds

Fig. 10
figure 10

Comparison of simulations (orange dashed) with mean field approximation (gray): \(P_{s}(k), P_{I}(k)\) and \(P_{w}(k)\) for \(\kappa _s = 7\), \(\kappa _w = 0.3\) and \(\kappa _I = 20\) for \(m = 20, N = 500\). Depicted below are two representative largest connected component draws from the simulation ensemble

Fig. 11
figure 11

Small world scaling of \(P_{s}(k)\) (blue dotted), \(P_{I}(k)\) (blue dashed) and \(P_{w}(k)\) (black) for \(\kappa _s = 7\), \(\kappa _w = 0.3\) and \(\kappa _I = 20\) for \(m = 2\times 10^3, N = 5\times 10^4\) (left) and \(m = 2\times 10^5, N = 5\times 10^6\) (right). N.B. the difference of \(+2\) between the mode of the distributions for \(P_{w}(k)\) and \(P_{s}(k)\)

In this regime, we consider \(\kappa _s \gtrsim 2\), \(\kappa _w < 1\) \(\kappa _I \gg 1\) and once more compare the results of our mean-field approximation to simulations. In Fig. 10, we see that even when the weak sub-network is not expected to be in the small world regime, the presence of bridge links with sufficient probability (\(\kappa _I = 20\) in this example) connects the individual nodes of the weak sub-network to the strong sub-network such that small world scaling is recovered for nodes that begin and end in the weak sub-network. That is, small world behavior can be induced in sub-networks that, by themselves, are not in the small world regime. This is straightforward to understand intuitively – in the limit where the weak sub-network is completely disconnected, any bridge links will induce a connected sub-network out of the disconnected network. The average length for paths that begin and end in the connected part of the weak sub-network will thus be on average simply the average distance within the strong network + 2 for the hop back and forth. Although we require that the network not have too many disconnected components for the validity of the mean-field approximation, this simple reasoning does seem to hold for parameter values consistent with the validity of the mean-field treatment, as seen in Fig. 11.

6 Discussion

Fig. 12
figure 12

Approaching maximal failure of the mean field approximation close to the critical point at \(\kappa = 1\): Comparison of simulated network (orange dashed) with mean field (gray) for \(p = 1.1/(N-1)\); \(N = 500\), along with representative draw from the graph ensemble

In this paper, we introduced a novel mean-field approximation for random networks. The motivations for such an approximation is many-fold. A priori, one sees the immediate need for some sort of systematic approximation by first constructing the generating functional for arbitrary realizations of network randomness, from which ensemble averages of quantities of interest can be derived in principle. Even simple quantities of interest, such as the average of the elements of the distance matrix prove to be far too cumbersome to evaluate even in idealized examples. The motivation for the particular mean-field approximation introduced in Sect. 3 was to explore the scaling behavior of average network distances, and that it should also be applicable to a wider variety of contexts. That is, even in cases where an underlying lattice sub-structure can’t be appealed to, or when we introduce disorder in varying forms.

The mean field approximation immediately yields a network order parameter \((1 - P_\infty )^{1/2}\) (Eq. 25), requiring suitable interpretation. The existence of a critical point at \(p = 1/(N-1)\) is manifest, however, as discussed in Sect. 3. One of the more predictable features of mean-field approximations its failure when ensemble fluctuations can no longer be neglected. As reasoned in Sect. 3, this is precisely the case as one approaches the phase transition, as depicted in Fig. 12,Footnote 15 and in Figs. 4, 5 and 6.

The utility of the mean-field approximation is manifest in its generalizability to various forms of network disorder. The dimorphic variant of the stochastic block model studied in Sect. 4 exhibits a rich phase structure. It is intended as a model of network disorder where not all nodes are the same but can connect to other nodes with varying probabilities. The machinery introduced here suggests an immediate generalization to weighted networks where the dimporphism is extended to the weights and will be the subject of a followup study [46]. Furthermore, these results can in principle extend to stochastic block models with more than two families. As discussed in the appendix, this requires the calculation of combinatorial factors obtainable by constructing the generating function for auto-correlations over an \(n-\)symbol alphabet, where n is the number of families. Our ultimate aim, is to arrive at as analytic understanding of various features of a prototype for disordered Gilbert–Erdös–Renyi networks and to apply the insights gained to various biological, sociologial and epidemiological systems.