LCF_graph#

LCF_graph(n, shift_list, repeats, create_using=None)[source]#

Return the cubic graph specified in LCF notation.

LCF (Lederberg-Coxeter-Fruchte) notation[R8553aaaa836a-1]_ is a compressed notation used in the generation of various cubic Hamiltonian graphs of high symmetry. See, for example, dodecahedral_graph, desargues_graph, heawood_graph and pappus_graph.

Nodes are drawn from range(n). Each node n_i is connected with node n_i + shift % n where shift is given by cycling through the input shift_list repeat s times.

Parameters:
nint

The starting graph is the n-cycle with nodes 0, ..., n-1. The null graph is returned if n < 1.

shift_listlist

A list of integer shifts mod n, [s1, s2, .., sk]

repeatsint

Integer specifying the number of times that shifts in shift_list are successively applied to each current node in the n-cycle to generate an edge between n_current and n_current + shift mod n.

Returns:
GGraph

A graph instance created from the specified LCF notation.

References

Examples

The utility graph \(K_{3,3}\)

>>> G = nx.LCF_graph(6, [3, -3], 3)
>>> G.edges()
EdgeView([(0, 1), (0, 5), (0, 3), (1, 2), (1, 4), (2, 3), (2, 5), (3, 4), (4, 5)])

The Heawood graph:

>>> G = nx.LCF_graph(14, [5, -5], 7)
>>> nx.is_isomorphic(G, nx.heawood_graph())
True