logo

Gilbert Model 📂Graph Theory

Gilbert Model

Definition 1 2

Simple Definition

A random network where links of a simple network are connected independently according to probability p[0,1]p \in [0,1] is called the Gilbert Model Gn,p\mathbb{G}_{n,p}.

Complicated Definition

Given a probability space (Ω,F,P)( \Omega , \mathcal{F} , P), and a network’s properties 2(n2)2(n2)2^{\binom{n}{2}} \subseteq 2^{\binom{n}{2}} with nn labeled nodes. A function that is measurable with respect to F\mathcal{F} and has the following probability mass function for the number of links 0m(n2)0 \le m \le \binom{n}{2} is called the Gilbert Model. P(Gn,p=G)=pm(1p)(n2)m,GGn,m2(n2) P \left( \mathbb{G}_{n,p} = G \right) = p^{m} \left( 1 - p \right)^{\binom{n}{2} - m} \qquad , \forall G \in \mathscr{G}_{n,m} \subset 2^{\binom{n}{2}}

Explanation

The Gilbert model, along with the Erdős-Rényi Model (ER Model), is mentioned in numerous documents, but in reality, many refer to the ER model when they actually use the Gilbert Model. There are differences between the two models. In fact, delving into it reveals they are different models enough to fill an entire thick book, but especially in the context of applied network theory, there is a strong tendency to lump these two together under the ER model. Although not a commonly used expression, it can also be called a Binomial Random Network given that its probability distribution is the binomial distribution.

Gn,p\mathbb{G}_{n,p} is expected to have approximately m=(n2)pn2p2\displaystyle m = \binom{n}{2} p \approx {{ n^{2} p } \over { 2 }} links. Unlike the ER model, which exactly has mm links, the number of links in the Gilbert Model is proportional to the network size by a coefficient pp, but the number of links is not fixed.

The definition might seem complex at a glance, but the algorithm is actually simple. Sampling a network using the Gilbert Model follows this algorithm.

Algorithm

Input

Assume the number of nodes nNn \in \mathbb{N} and the link probability p(0,1)p \in \left( 0, 1 \right) are given.


Step 1. Initialization

Create a null graph GG with nn nodes.


Step 2. Bernoulli Trials

for i=1,,ni = 1 , \cdots , n
  for j=1,,nj = 1 , \cdots , n
    if iji \ne j
      Add a link ijij to the network GG with probability pp.GG+ijG \gets G + ij


Output

Obtain a simple graph G2(n2)G \in 2^{\binom{n}{2}} with nn nodes and approximately mn2p/2m \approx n^{2} p / 2 links.

Properties

  • [1]: The number of links sampled from the Gilbert Model Gn,p\mathbb{G}_{n,p} exactly needing to be mm is the same as being sampled in Gn,m\mathbb{G}_{n,m}.
  • [2] Degree distribution: If λ=np\lambda = np, then when nn \to \infty, the degree of each node converges in distribution to the Poisson distribution Poi(np)\displaystyle \text{Poi} \left( np \right). P(degv=k)eλλkk!,λnp P \left( \deg v = k \right) \to {{ e^{-\lambda} \lambda^{k} } \over { k! }} \qquad , \lambda \approx np

Proof

[1]

Erdős-Rényi Model: This random graph is called the Erdős–Rényi Graph Gn,m\mathbb{G}_{n,m}, with the following probability mass function. P(Gn,m=G)=((n2)m)1,GGn,m P \left( \mathbb{G}_{n,m} = G \right) = \binom{\binom{n}{2}}{m}^{-1} \qquad , \forall G \in \mathscr{G}_{n,m}

Claim: For any G0Gn,mG_{0} \in \mathscr{G}_{n,m}, it suffices to prove the following. P(Gn,p=G0Gn,pGn,m)=((n2)m)1 P \left( \mathbb{G}_{n,p} = G_{0} | \mathbb{G}_{n,p} \in \mathscr{G}_{n,m} \right) = \binom{\binom{n}{2}}{m}^{-1}


Obviously, the probability of having exactly G0G_{0} links in Gn,p\mathbb{G}_{n,p} is less than having Gn,pGn,m\mathbb{G}_{n,p} \in \mathscr{G}_{n,m} links, i.e., sampling with the Gilbert Model and ending up with mm links in total. Representing this as an event gives {Gn,p=G0}{Gn,pGn,m}    {Gn,p=G0}{Gn,pGn,m}={Gn,p=G0}() \begin{align*} \left\{ \mathbb{G}_{n,p} = G_{0} \right\} & \subset \left\{ \mathbb{G}_{n,p} \in \mathscr{G}_{n,m} \right\} \\ \implies \left\{ \mathbb{G}_{n,p} = G_{0} \right\} & \cap \left\{ \mathbb{G}_{n,p} \in \mathscr{G}_{n,m} \right\} = \left\{ \mathbb{G}_{n,p} = G_{0} \right\} \qquad \cdots (\star) \end{align*} Calculating each probability gives P(Gn,p=G0)=pm(1p)(n2)m\displaystyle P \left( \mathbb{G}_{n,p} = G_{0} \right) = p^{m} \left( 1 - p \right)^{\binom{n}{2} - m} thus P(Gn,pGn,m)=P(GGn,m{Gn,p=G})=GGn,mP(Gn,p=G)=((n2)m)pm(1p)(n2)m \begin{align*} & P \left( \mathbb{G}_{n,p} \in \mathscr{G}_{n,m} \right) \\ =& P \left( \bigcup_{G \in \mathscr{G}_{n,m}} \left\{ \mathbb{G}_{n,p} = G \right\} \right) \\ =& \sum_{G \in \mathscr{G}_{n,m}} P \left( \mathbb{G}_{n,p} = G \right) \\ =& \binom{\binom{n}{2}}{m} p^{m} \left( 1 - p \right)^{\binom{n}{2} - m} \end{align*} Now, the conditional probability can be shown as P(Gn,p=G0Gn,pGn,m)=P(Gn,p=G0Gn,pGn,m)P(Gn,pGn,m)=P(Gn,p=G0)P(Gn,pGn,m)()=pm(1p)(n2)m((n2)m)pm(1p)(n2)m=((n2)m)1 \begin{align*} P \left( \mathbb{G}_{n,p} = G_{0} | \mathbb{G}_{n,p} \in \mathscr{G}_{n,m} \right) =& {{ P \left( \mathbb{G}_{n,p} = G_{0} \land \mathbb{G}_{n,p} \in \mathscr{G}_{n,m} \right) } \over { P \left( \mathbb{G}_{n,p} \in \mathscr{G}_{n,m} \right) }} \\ =& {{ P \left( \mathbb{G}_{n,p} = G_{0} \right) } \over { P \left( \mathbb{G}_{n,p} \in \mathscr{G}_{n,m} \right) }} & \because (\star) \\ =& {{ p^{m} \left( 1 - p \right)^{\binom{n}{2} - m} } \over { \binom{\binom{n}{2}}{m} p^{m} \left( 1 - p \right)^{\binom{n}{2} - m} }} \\ =& \binom{\binom{n}{2}}{m}^{-1} \end{align*} where \land is the logical product.

[2]

Given nn nodes and each node having a connection probability of pp, the degree of the node depends on whether it is connected to the remaining (n1)(n-1) other nodes, hence follows the binomial distribution B(n1,p)B(n-1,p). Expressing it with a formula yields the following. P(degv=k)=(n1k)pk(1p)n1k P \left( \deg v = k \right) = \binom{n-1}{k} p^{k} \left( 1 - p \right)^{n-1-k}

Poisson Distribution as a Limit of the Binomial Distribution: Let’s say XnB(n,p)X_{n} \sim B(n,p).

If λnp\lambda \approx np, then XnDPoi(λ) X_{n} \overset{D}{\to} \text{Poi} (\lambda)

According to the lemma, the degree of nodes in a sufficiently large Gilbert network follows the Poisson distribution.

Visualization

Here are the sampled ER network and histogram of node degrees when n=50n = 50, p=12%p = 12\%.

plot_G_np.png histogram_G_np.png

Code

Here is the code using Graphs and GraphRecipes packages of Julia.

cd(@__DIR__); pwd()

@time using Graphs
@time using Plots
@time using GraphRecipes

n = 50
G_np = erdos_renyi(n, 6/n, seed = 0)
plot_G_np = graphplot(G_np, title = "n = 50, p = 12%", curves=false, size = (300,300), node_weights = degree(G_np).^2,
 node_shape = :rect, nodecolor = :black, nodestrokealpha = 0.5, edgecolor = :black)
png(plot_G_np, "plot_G_np.png")
histogram_G_np = histogram(degree(G_np), title = "Histogram of Degree",
 color = :black, alpha = 0.8, label = :none, size = (300,300))
png(histogram_G_np, "histogram_G_np.png")

Generalization


  1. Gilbert. (1959). Random Graphs ↩︎

  2. Frieze. (2015). Introduction to Random Graphs: p3. ↩︎