BernoulliGraphDistribution

BernoulliGraphDistribution[n,p]

represents a Bernoulli graph distribution for n-vertex graphs with edge probability p.

Details and Options

Examples

open allclose all

Basic Examples  (2)

Generate a pseudorandom graph:

Distribution of the number of edges:

Probability density function:

Scope  (4)

Generate simple undirected graphs:

Simple directed graphs:

Generate a set of pseudorandom graphs:

Compute probabilities and statistical properties:

Options  (2)

DirectedEdges  (2)

By default, a Bernoulli graph is undirected:

With the setting DirectedEdges->True, directed Bernoulli graphs are generated:

Applications  (3)

After 20 children have spent their first week in kindergarten, the probability that two children have made friends is 0.2:

Find the probability that the social network is connected:

In a snowball fight with 15 participants, and everybody throwing snowballs at everyone else, the probability of being hit by any given participant is 0.4:

Find the size of the largest group where everybody has been hit by everyone else:

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:

Properties & Relations  (6)

Distribution of the number of vertices:

Distribution of the number of edges:

Probability density function:

The mean of the number of edges:

Distribution of the degree of a vertex:

Probability density function:

The mean of the degree of a vertex:

Connectivity for large n with respect to p:

A Bernoulli graph is almost surely disconnected for :

A Bernoulli graph is almost surely connected for :

Use BernoulliDistribution to simulate a BernoulliGraphDistribution:

Pseudorandom graphs:

Edge probability 1 results in the CompleteGraph:

Edge probability 0 results in the empty graph:

Neat Examples  (1)

Randomly colored vertices:

Wolfram Research (2010), BernoulliGraphDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/BernoulliGraphDistribution.html.

Text

Wolfram Research (2010), BernoulliGraphDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/BernoulliGraphDistribution.html.

CMS

Wolfram Language. 2010. "BernoulliGraphDistribution." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BernoulliGraphDistribution.html.

APA

Wolfram Language. (2010). BernoulliGraphDistribution. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BernoulliGraphDistribution.html

BibTeX

@misc{reference.wolfram_2024_bernoulligraphdistribution, author="Wolfram Research", title="{BernoulliGraphDistribution}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/BernoulliGraphDistribution.html}", note=[Accessed: 05-October-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_bernoulligraphdistribution, organization={Wolfram Research}, title={BernoulliGraphDistribution}, year={2010}, url={https://reference.wolfram.com/language/ref/BernoulliGraphDistribution.html}, note=[Accessed: 05-October-2024 ]}