Neighborhood diversity
Lax825442.NeighborhoodDiversity · concepts/Lax825442/NeighborhoodDiversity.lean · lax-825442
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
Neighborhood diversity is the minimum number of parts partitioning the vertices such that each part is a module and induces either a clique or an independent set. The empty graph has value zero.
Concept map
Lean source view on GitHub
| 1 | import Mathlib.Combinatorics.SimpleGraph.Finite |
| 2 | import Mathlib.Data.Set.Card |
| 3 | import Mathlib.Order.Lattice.Nat |
| 4 | |
| 5 | /-! |
| 6 | --- |
| 7 | title: Neighborhood diversity |
| 8 | type: definition |
| 9 | --- |
| 10 | Neighborhood diversity is the minimum number of parts partitioning the |
| 11 | vertices such that each part is a module and induces either a clique or an |
| 12 | independent set. The empty graph has value zero. |
| 13 | -/ |
| 14 | |
| 15 | namespace Lax825442.NeighborhoodDiversity |
| 16 | |
| 17 | /-- A partition into `k` parts, each a module and each inducing a clique or |
| 18 | an independent set. Empty labels are allowed and disappear at the minimum. -/ |
| 19 | def HasNeighborhoodDiversityAtMost {V : Type} [Fintype V] [DecidableEq V] |
| 20 | (G : SimpleGraph V) (k : ℕ) : Prop := |
| 21 | ∃ part : V → Fin k, |
| 22 | (∀ u v w : V, |
| 23 | (part u = part v ∧ part w ≠ part u) → (G.Adj u w ↔ G.Adj v w)) ∧ |
| 24 | (∀ i : Fin k, |
| 25 | (∀ u v : V, |
| 26 | (u ≠ v ∧ (part u = i ∧ part v = i)) → G.Adj u v) ∨ |
| 27 | (∀ u v : V, |
| 28 | (part u = i ∧ part v = i) → ¬ G.Adj u v)) |
| 29 | |
| 30 | /-- The minimum number of neighborhood-diversity parts. -/ |
| 31 | noncomputable def neighborhoodDiversity {V : Type} [Fintype V] [DecidableEq V] |
| 32 | (G : SimpleGraph V) : ℕ := |
| 33 | sInf {k | HasNeighborhoodDiversityAtMost G k} |
| 34 | |
| 35 | end Lax825442.NeighborhoodDiversity |
| 36 |
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