GraphDensity

GraphDensity[g]
gives the graph density of the graph g.

GraphDensity[{vw,}]
uses rules vw to specify the graph g.

Details and OptionsDetails and Options

  • GraphDensity is the ratio of the number of edges divided by the number of edges of a complete graph with the same number of vertices.
  • A simple undirected graph with vertices and edges has graph density .
  • A simple directed graph with vertices and edges has graph density .

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Compute the density of a graph:

In[3]:=
Click for copyable input
Out[3]=

Graph density distribution of the Bernoulli graph model:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
Introduced in 2012
(9.0)
| Updated in 2015
(10.3)