I'm trying to reproduce the synthetic networks (graphs) described in some papers.
The topic is the same as a previous question of mine, but with a different focus.
It is stated that the Erdos-Renyi model was used to create $2$ networks with average degrees $\langle k_a \rangle$ and $\langle k_b \rangle$.
In the first paper, the average degree is $k = 4$ , while the number of nodes $n$ is 50000.
In the second paper the average degree is not called $k$, but it's stated that the mean degree is $1.999$ for $n = 200$ (in Fig. 2), while it is $2.45$ for $n = 4000 $ and $ n = 6000$ (in Fig. 7).
I looked for libraries implementing the Erdos-Renyi algorithm and they seem to require different parameters than average degree. One is NetworkX, another is igraph. They work in similar ways and ask for:
- $n$ - number of nodes
- $0 \leq p \leq 1$ - the probability for drawing an edge between two arbitrary vertices
- $m$ - the number of edges in the graph (in alternative to $p$, only in igraph)
How can I calculate the settings to generate a graph with the same average degree as the ones described in the papers?
Here are the references:
- Catastrophic cascade of failures in interdependent networks, Buldyrev et al. 2010, with a separately provided Supplementary Information
- Small Cluster in Cyber Physical Systems, Huang et al. 2014
- Catastrophic cascade of failures in interdependent networks, Havlin et al. 2010, this is on the Arxiv and somewhat clarifies the first
Note that these papers used generating functions to analytically study some properties of those graphs. However, they also run simulations on those models, so they must have generated those networks somehow.