This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

BernoulliGraphDistribution

BernoulliGraphDistribution
represents a Bernoulli graph distribution for n-vertex graphs with edge probability p.
  • The Bernoulli graph is constructed starting with the complete graph with n vertices and selecting each edge independently through a Bernoulli trial with probability p.
Generate an undirected random graph with 5 vertices and edge probability 0.6:
Generate a directed random graph with 5 vertices and edge probability 0.6:
Generate several graphs:
Generate an undirected random graph with 5 vertices and edge probability 0.6:
In[1]:=
Click for copyable input
Out[1]=
 
Generate a directed random graph with 5 vertices and edge probability 0.6:
In[1]:=
Click for copyable input
Out[1]=
 
Generate several graphs:
In[1]:=
Click for copyable input
Out[1]=
Find the largest component fraction when the mean vertex degree is :
Average the result over 100 runs and plot it for different numbers of vertices:
Using edge probability 1 results in the CompleteGraph:
The Bernoulli graph distribution selects each edge from the complete graph with probability :
The edge count for BernoulliGraphDistribution follows a BinomialDistribution:
Mean and standard deviation:
Compare data and distribution cases:
The vertex degree for BernoulliGraphDistribution follows a BinomialDistribution:
Mean and standard deviation:
Compare data and distribution cases:
Show the in- and out-degree histogram for BernoulliGraphDistribution:
The in- and out-degree distribution follows BinomialDistribution:
Show them all together:
Random colored vertices:
New in 8