+
    �°³jò  ã                   ó¼   € R t ^ RIt^ RIHt RR.t]! R4      ]! R4      ]P                  ! RR7      RR	 l4       4       4       t]P                  ! RRR
7      R 4       tR# )zTFunctions related to the Mycielski Operation and the Mycielskian family
of graphs.

N)Únot_implemented_forÚmycielskianÚmycielski_graphÚdirectedÚ
multigraphT)Úreturns_graphc                óÒ  a€ \         P                  ! V 4      p\        V4       FÀ  pVP                  4       oVP	                  \        S^S,          4      4       \        VP                  4       4      pVP                  V3R lV 4       4       VP                  V3R lV 4       4       VP                  ^S,          4       VP                  V3R l\        S4       4       4       KÂ  	  V# )aê  Returns the Mycielskian of a simple, undirected graph G

The Mycielskian of graph preserves a graph's triangle free
property while increasing the chromatic number by 1.

The Mycielski Operation on a graph, :math:`G=(V, E)`, constructs a new
graph with :math:`2|V| + 1` nodes and :math:`3|E| + |V|` edges.

The construction is as follows:

Let :math:`V = {0, ..., n-1}`. Construct another vertex set
:math:`U = {n, ..., 2n}` and a vertex, `w`.
Construct a new graph, `M`, with vertices :math:`U \bigcup V \bigcup w`.
For edges, :math:`(u, v) \in E` add edges :math:`(u, v), (u, v + n)`, and
:math:`(u + n, v)` to M. Finally, for all vertices :math:`u \in U`, add
edge :math:`(u, w)` to M.

The Mycielski Operation can be done multiple times by repeating the above
process iteratively.

More information can be found at https://en.wikipedia.org/wiki/Mycielskian

Parameters
----------
G : graph
    A simple, undirected NetworkX graph
iterations : int
    The number of iterations of the Mycielski operation to
    perform on G. Defaults to 1. Must be a non-negative integer.

Returns
-------
M : graph
    The Mycielskian of G after the specified number of iterations.

Notes
-----
Graph, node, and edge data are not necessarily propagated to the new graph.

c              3   ó<   <"  € T F  w  rWS,           3x € K  	  R # 5i©N© ©Ú.0ÚuÚvÚns   &  €Ú^/home/luca/screen-checking/.venv/lib/python3.14/site-packages/networkx/generators/mycielski.pyÚ	<genexpr>Úmycielskian.<locals>.<genexpr>?   s   øé € Ð:±	©¨˜! �U�³	ùs   ƒc              3   ó>   <"  € T F  w  rVS,           V3x € K  	  R # 5ir
   r   r   s   &  €r   r   r   @   s   øé € Ð:±	©¨˜!˜a�% �³	ùs   ƒc              3   óF   <"  € T F  qS,           ^S,          3x € K  	  R# 5i)é   Nr   )r   r   r   s   & €r   r   r   B   s   øé € Ð:±¨A˜a�%  Q¥�³ùs   ƒ!)	ÚnxÚconvert_node_labels_to_integersÚrangeÚnumber_of_nodesÚadd_nodes_fromÚlistÚedgesÚadd_edges_fromÚadd_node)ÚGÚ
iterationsÚMÚiÚ	old_edgesr   s   &&   @r   r   r      s±   ø€ ôZ 	×*Ò*¨1Ó-€Aä�:ÖˆØ×ÑÓˆØ	×Ñœ˜q ! a¥%›Ô)Ü˜Ÿ™›“Oˆ	Ø	×ÑÔ:±	Ó:Ô:Ø	×ÑÔ:±	Ó:Ô:Ø	�
‰
�1�q•5ÔØ	×ÑÔ:´°q´Ó:Ö:ñ ð €Hó    )Úgraphsr   c                óÄ   € V ^8  d   \         P                  ! R4      hV ^8X  d   \         P                  ! ^4      # \        \         P                  ! ^4      V ^,
          4      # )a/  Generator for the n_th Mycielski Graph.

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

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

Parameters
----------
n : int
    The desired Mycielski Graph.

Returns
-------
M : graph
    The n_th Mycielski Graph

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

zmust satisfy n >= 1)r   ÚNetworkXErrorÚempty_graphr   Ú
path_graph)r   s   &r   r   r   G   sP   € ð@ 	ˆ1„uÜ×ÒÐ4Ó5Ð5àˆA„vÜ�~Š~˜aÓ Ð ô œ2Ÿ=š=¨Ó+¨Q°­UÓ3Ð3r%   )é   )	Ú__doc__Únetworkxr   Únetworkx.utilsr   Ú__all__Ú_dispatchabler   r   r   r%   r   Ú<module>r1      sx   ðñó
 Ý .àÐ+Ð
,€ñ �ZÓ Ù�\Ó"Ø×Ò Ô%ó5ó &ó #ó !ð5ðp ×Ò˜¨TÔ2ñ&4ó 3ò&4r%   