dorogovtsev_goltsev_mendes_graph#

dorogovtsev_goltsev_mendes_graph(n, create_using=None)[source]#

Returns the hierarchically constructed Dorogovtsev-Goltsev-Mendes graph.

The Dorogovtsev-Goltsev-Mendes [1] procedure produces a scale-free graph deterministically with the following properties for a given n: - Total number of nodes = 3 * (3**n + 1) / 2 - Total number of edges = 3 ** (n + 1)

Parameters:
ninteger

The generation number.

create_usingNetworkX Graph, optional

Graph type to be returned. Directed graphs and multi graphs are not supported.

Returns:
GNetworkX Graph

References

[1]

Dorogotsev S.N., Goltsev A.V., and Mendes J.F.F “Pseudofractal Scale-free Web”. arXiv:cond-mat/0112143

Examples

>>> G = nx.dorogovtsev_goltsev_mendes_graph(3)
>>> G.number_of_nodes()
15
>>> G.number_of_edges()
27
>>> nx.is_planar(G)
True