Warning

This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.

networkx.generators.classic.binomial_tree

binomial_tree(n)[source]

Returns the Binomial Tree of order n.

The binomial tree of order 0 consists of a single vertex. A binomial tree of order k is defined recursively by linking two binomial trees of order k-1: the root of one is the leftmost child of the root of the other.

Parameters

n (int) – Order of the binomial tree.

Returns

G – A binomial tree of \(2^n\) vertices and \(2^n - 1\) edges.

Return type

NetworkX graph