Function Repository Resource:

DorogovtsevGoltsevMendesGraph

Source Notebook

Generate a Dorogovtsev–Goltsev–Mendes graph

Contributed by: Wolfram Staff

ResourceFunction["DorogovtsevGoltsevMendesGraph"][n]

gives the Dorogovtsev-Goltsev-Mendes graph of order n.

Details

The Dorogovtsev-Goltsev-Mendes graphs are a family of recursively-generated graphs where the nth-order graph is obtained from the (n-1)th-order graph by adding a new vertex for each edge, and connecting the new vertex with the vertices comprising the edge.
The Dorogovtsev-Goltsev-Mendes graphs can be used to model scale-free random networks, whose degree distribution spectra exhibit a power-law decay.
ResourceFunction["DorogovtsevGoltsevMendesGraph"][0] is equivalent to a path graph with two vertices.
ResourceFunction["DorogovtsevGoltsevMendesGraph"] takes the same options as Graph.

Examples

Basic Examples (1) 

A Dorogovtsev-Goltsev-Mendes graph of order 3:

In[1]:=
ResourceFunction["DorogovtsevGoltsevMendesGraph"][3]
Out[1]=

Scope (3) 

Dorogovtsev-Goltsev-Mendes graphs quickly become very complex:

In[2]:=
gl = Table[
  ResourceFunction["DorogovtsevGoltsevMendesGraph"][n], {n, 5}]
Out[2]=

The number of edges grows exponentially:

In[3]:=
EdgeCount /@ gl
Out[3]=

Show a 3D embedding of a Dorogovtsev-Goltsev-Mendes graph:

In[4]:=
Graph3D[ResourceFunction["DorogovtsevGoltsevMendesGraph"][5], GraphLayout -> "SpringElectricalEmbedding"]
Out[4]=

Visualize the adjacency matrix of a Dorogovtsev-Goltsev-Mendes graph:

In[5]:=
MatrixPlot[
 AdjacencyMatrix[
  ResourceFunction["DorogovtsevGoltsevMendesGraph"][7]]]
Out[5]=

Properties and Relations (2) 

DorogovtsevGoltsevMendesGraph[0] is equivalent to a path graph with two vertices:

In[6]:=
ResourceFunction["DorogovtsevGoltsevMendesGraph"][0]
Out[6]=
In[7]:=
IsomorphicGraphQ[%, PathGraph[1 \[UndirectedEdge] 2]]
Out[7]=

DorogovtsevGoltsevMendesGraph[1] is equivalent to a cycle graph with three vertices:

In[8]:=
ResourceFunction["DorogovtsevGoltsevMendesGraph"][1]
Out[8]=
In[9]:=
IsomorphicGraphQ[%, CycleGraph[3]]
Out[9]=

Requirements

Wolfram Language 12.3 (May 2021) or above

Version History

  • 1.0.0 – 08 December 2023

Source Metadata

Related Resources

License Information