The oriented cycle as a SimpleGraph #
The undirected graph underlying the oriented n-cycle ZMod n is Mathlib's circulant graph with
jump 1, OrientedCycle.graph n. For n = k + 1 it is SimpleGraph.cycleGraph (k + 1)
(OrientedCycle.graph_succ_eq_cycleGraph); for n = 0 it is the two-way infinite path on ℤ.
Away from the one-node cycle, whose only node is its own successor, IsProperColoring is exactly
Mathlib's notion of a proper colouring of this graph (OrientedCycle.isProperColoring_iff_adj), so
the colourings computed in this directory are SimpleGraph.Colorings.
Main definitions #
Cslib.Distributed.OrientedCycle.graph: the undirected graph of the orientedn-cycle.Cslib.Distributed.OrientedCycle.IsProperColoring.toColoring: a proper colouring as aSimpleGraph.Coloring.
Main results #
Cslib.Distributed.OrientedCycle.graph_succ_eq_cycleGraph:graph (k + 1)is Mathlib'scycleGraph (k + 1).Cslib.Distributed.OrientedCycle.isProperColoring_iff_adj: proper colourings of the oriented cycle are the proper colourings of its graph, forn ≠ 1.Cslib.Distributed.OrientedCycle.Algorithm.ColorsCycle.exists_coloring: an algorithm thatc-colours oriented cycles outputs aSimpleGraph.Coloringwithccolours.
The undirected graph of the oriented n-cycle: Mathlib's circulant graph on ZMod n with jump
1, in which u and v are adjacent iff u ≠ v and one is the successor of the other.
For n = k + 1 the graph of the oriented cycle is Mathlib's cycleGraph (k + 1) on
Fin (k + 1) = ZMod (k + 1).
For n ≠ 1, a colouring of the oriented cycle is proper iff adjacent nodes of its graph get
different colours. On the one-node cycle no colouring is proper, while its graph has no edges.
A proper colouring of the oriented cycle as a colouring of its graph.
An algorithm that properly c-colours every oriented n-cycle, n ≠ 1, in t rounds outputs
a colouring of graph n with colours Fin c.