networkx 2.8.2 Pypi GitHub Homepage
Other Docs
NotesParametersReturns
mycielski_graph(n)

The Mycielski family of graphs is an infinite set of graphs. $M_1$ is the singleton graph, $M_2$ is two vertices with an edge, and, for $i > 2$ , $M_i$ is the Mycielskian of $M_{i-1}$ .

More information can be found at http://mathworld.wolfram.com/MycielskiGraph.html

Notes

The first graph in the Mycielski sequence is the singleton graph. The Mycielskian of this graph is not the $P_2$ graph, but rather the $P_2$ graph with an extra, isolated vertex. The second Mycielski graph is the $P_2$ graph, so the first two are hard coded. The remaining graphs are generated using the Mycielski operation.

Parameters

n : int

The desired Mycielski Graph.

Returns

M : graph

The n_th Mycielski Graph

Generator for the n_th Mycielski Graph.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /networkx/generators/mycielski.py#70
type: <class 'function'>
Commit: