NetworkX

Previous topic

bipartite_preferential_attachment_graph

Next topic

bipartite_random_graph

bipartite_random_regular_graph

bipartite_random_regular_graph(d, n, create_using=None, seed=None)[source]

Experimental: Generate a random regular bipartite graph.

Parameters :

d : integer

Degree of graph.

n : integer

Number of nodes in graph.

create_using : NetworkX graph instance, optional

Return graph of this type.

seed : integer, optional

Seed for random number generator.

Notes

This is an untested, unproved algorithm.

Nodes are numbered 0...n-1.

Restrictions on n and d:
  • n must be even
  • n>=2*d

Algorithm inspired by random_regular_graph()