5.3.2. networkx.generators.expanders.chordal_cycle_graph¶
-
networkx.generators.expanders.chordal_cycle_graph(p, create_using=None)[source]¶ Return the chordal cycle graph on p nodes.
The returned graph is a cycle graph on p nodes with chords joining each vertex x to its inverse modulo p. This graph is a (mildly explicit) 3-regular expander [R1028].
p must be a prime number.
Parameters: p : a prime number
The number of vertices in the graph. This also indicates where the chordal edges in the cycle will be created.
create_using : graph-like
A graph-like object that receives the constructed edges. If None, then a
MultiGraphinstance is used.Returns: G : graph
The constructed undirected multigraph.
Raises: NetworkXError
If the graph provided in create_using is directed or not a multigraph.
References
[R1028] (1, 2) Theorem 4.4.2 in A. Lubotzky. “Discrete groups, expanding graphs and invariant measures”, volume 125 of Progress in Mathematics. Birkhäuser Verlag, Basel, 1994.