Distance to cluster graphs
Lax825442.DistanceToCluster · concepts/Lax825442/DistanceToCluster.lean · lax-825442
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
A cluster graph is a disjoint union of cliques, including isolated vertices and the empty graph. Equivalently, its complement is complete multipartite. The distance to cluster graphs is the minimum number of vertices whose deletion leaves a cluster induced graph. The target predicate reuses mathlib's on the complement.
Concept map
Lean source view on GitHub
| 1 | import Mathlib.Combinatorics.SimpleGraph.CompleteMultipartite |
| 2 | import Mathlib.Combinatorics.SimpleGraph.Finite |
| 3 | import Mathlib.Order.Lattice.Nat |
| 4 | |
| 5 | /-! |
| 6 | --- |
| 7 | title: Distance to cluster graphs |
| 8 | type: definition |
| 9 | --- |
| 10 | A cluster graph is a disjoint union of cliques, including isolated vertices |
| 11 | and the empty graph. Equivalently, its complement is complete multipartite. |
| 12 | The distance to cluster graphs is the minimum number of vertices whose |
| 13 | deletion leaves a cluster induced graph. The target predicate reuses |
| 14 | mathlib's `SimpleGraph.IsCompleteMultipartite` on the complement. |
| 15 | -/ |
| 16 | |
| 17 | namespace Lax825442.DistanceToCluster |
| 18 | |
| 19 | /-- Minimum number of vertices whose deletion leaves a disjoint union of cliques. -/ |
| 20 | noncomputable def distanceToCluster {V : Type} [Fintype V] [DecidableEq V] |
| 21 | (G : SimpleGraph V) : ℕ := |
| 22 | sInf {k : ℕ | ∃ S : Finset V, (S.card = k) ∧ |
| 23 | ((G.induce {v | v ∉ S})ᶜ.IsCompleteMultipartite)} |
| 24 | |
| 25 | end Lax825442.DistanceToCluster |
| 26 |
Builds on
none
Used by
none
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments