The chromatic number of a graph is the minimal number of colors needed to color it.
This is ⊤ (infinity) iff G isn't colorable with finitely many colors.
If G is colorable, then ENat.toNat G.chromaticNumber is the ℕ-valued chromatic number.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A set of edges is critical if deleting them reduces the chromatic number.
Equations
- G.IsCriticalEdges edges = ((G.deleteEdges edges).chromaticNumber < G.chromaticNumber)
Instances For
An edge is critical if deleting it reduces the chromatic number.
Equations
- G.IsCriticalEdge e = G.IsCriticalEdges {e}
Instances For
A set of vertices is critical if deleting them reduces the chromatic number.
Equations
- SimpleGraph.Subgraph.IsCriticalVerts verts G' = ((G'.deleteVerts verts).coe.chromaticNumber < G'.coe.chromaticNumber)
Instances For
A vertex is critical if deleting it reduces the chromatic number.
Equations
Instances For
A graph G is k-critical (or vertex-critical) if its chromatic number is k,
and deleting any single vertex reduces the chromatic number.
Equations
- G.IsCritical k = (G.chromaticNumber = ↑k ∧ ∀ (v : V), SimpleGraph.Subgraph.IsCriticalVertex v ⊤)
Instances For
The chromatic number of a graph is the minimal number of colors needed to color it.
This is ⊤ (infinity) iff G isn't colorable with finitely many colors.
If G is colorable, then ENat.toNat G.chromaticNumber is the ℕ-valued chromatic number.
Equations
- G.cochromaticNumber = ⨅ n ∈ setOf G.Cocolorable, ↑n
Instances For
The chromatic cardinal is the minimal number of colors need to color it. In contrast to
chromaticNumber, which assigns ⊤ : ℕ∞ to all non-finitely colorable graphs, this definition
returns a Cardinal and can therefore distinguish between different infinite chromatic numbers.
Equations
- G.chromaticCardinal = sInf {κ : Cardinal.{?u.13} | ∃ (C : Type ?u.13) (_ : Cardinal.mk C = κ), Nonempty (G.Coloring C)}
Instances For
A finite graph is CDS-colorable if it has a proper coloring
by natural numbers such that for all k > 0, the number of
vertices with color < k equals the maximum size of
the union of k independent sets.
Equations
- SimpleGraph.CDSColorable = ∃ (C : G.Coloring ℕ), ∀ (k : ℕ), ∑ i ∈ Finset.Iio k, (C.colorClass i).ncard = G.indepNumK k
Instances For
A homomorphism is rainbow if it maps distinct edges to distinct colors.
Equations
- SimpleGraph.IsRainbow f c = Function.Injective fun (e : ↑H.edgeSet) => c (Sym2.map ⇑f ↑e)
Instances For
The anti-Ramsey number $\mathrm{AR}(n, H)$: maximum colors to edge-color $K_n$ without rainbow $H$.