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_graphandpappus_graph.Nodes are drawn from
range(n). Each noden_iis connected with noden_i + shift % nwhereshiftis given by cycling through the inputshift_listrepeats times.- Parameters:
- nint
The starting graph is the
n-cycle with nodes0, ..., n-1. The null graph is returned ifn< 1.- shift_listlist
A list of integer shifts mod
n,[s1, s2, .., sk]- repeatsint
Integer specifying the number of times that shifts in
shift_listare successively applied to each current node in the n-cycle to generate an edge betweenn_currentandn_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