NetworkX

Previous topic

networkx.barabasi_albert_graph

Next topic

networkx.random_lobster

Quick search

networkx.powerlaw_cluster_graph

powerlaw_cluster_graph(n, m, p, seed=None)

Holme and Kim algorithm for growing graphs with powerlaw degree distribution and approximate average clustering.

Parameters:
  • n: the number of nodes
  • m: the number of random edges to add for each new node
  • p: probability of adding a triangle after adding a random edge
  • seed: seed for random number generator (default=None)

Reference:

@Article{growing-holme-2002,
author =          {P. Holme and B. J. Kim},
title =   {Growing scale-free networks with tunable clustering},
journal =         {Phys. Rev. E},
year =    {2002},
volume =          {65},
number =          {2},
pages =   {026107},
}

The average clustering has a hard time getting above a certain cutoff that depends on m. This cutoff is often quite low. Note that the transitivity (fraction of triangles to possible triangles) seems to go down with network size.

It is essentially the Barabási-Albert growth model with an extra step that each random edge is followed by a chance of making an edge to one of its neighbors too (and thus a triangle).

This algorithm improves on B-A in the sense that it enables a higher average clustering to be attained if desired.

It seems possible to have a disconnected graph with this algorithm since the initial m nodes may not be all linked to a new node on the first iteration like the BA model.