Documentation

CslibFrontier.Foundations.Combinatorics.SimpleGraph.Ramsey.Basic

Ramsey numbers of graphs #

The Ramsey number R(k, l) is the least n such that every simple graph on n vertices has a clique of size k or an independent set of size l. A graph on Fin n is the same thing as a red/blue colouring of the edges of the complete graph K_n (red edges are the adjacencies), so this is the classical two-colour Ramsey number.

The upper bound is the induction of Erdős and Szekeres. To find an (a + 2)-clique or a (b + 1)-independent set in a set of C(a + b + 1, a + 1) vertices, fix a vertex v: it has at least C(a + b, a) neighbours or at least C(a + b, a + 1) non-neighbours in the set. An (a + 1)-clique among the neighbours, or a b-independent set among the non-neighbours, extends by v. Hence R(a + 1, b + 1) ≤ C(a + b, a), that is R(k, l) ≤ C(k + l - 2, k - 1) for k, l ≥ 1, and R(k, k) ≤ 4 ^ (k - 1) [ErdosSzekeres1935, pp. 466–467].

Main definitions #

Main results #

References #

theorem SimpleGraph.exists_isNClique_or_isNIndepSet_of_choose_le {V : Type u_1} (G : SimpleGraph V) (a b : ℕ) (s : Finset V) :
(a + b).choose a ≤ s.card → (∃ t ⊆ s, G.IsNClique (a + 1) t) ∨ ∃ t ⊆ s, G.IsNIndepSet (b + 1) t

Erdős–Szekeres: in any graph, every set of at least C(a + b, a) vertices contains a clique of size a + 1 or an independent set of size b + 1 [ErdosSzekeres1935, pp. 466–467].

noncomputable def SimpleGraph.ramseyNumber (k l : ℕ) :

The Ramsey number R(k, l): the least n such that every simple graph on Fin n has a clique of size k or an independent set of size l. Equivalently, every red/blue colouring of the edges of K_n has a red K_k or a blue K_l. The set of such n is nonempty by SimpleGraph.exists_isNClique_or_isNIndepSet_of_choose_le, so the infimum is attained, and SimpleGraph.ramseyNumber_le_card_iff characterizes it on every finite vertex type.

theorem SimpleGraph.ramseyNumber_le_card_iff {V : Type u_1} {k l : ℕ} [Fintype V] :
ramseyNumber k l ≤ Fintype.card V ↔ ∀ (G : SimpleGraph V), (∃ (s : Finset V), G.IsNClique k s) ∨ ∃ (s : Finset V), G.IsNIndepSet l s

R(k, l) ≤ |V| exactly when every graph on V has a k-clique or an l-independent set.

|V| < R(k, l) exactly when some graph on V has no k-clique and no l-independent set. This is how lower bounds on Ramsey numbers are proved.

theorem SimpleGraph.exists_isNClique_or_isNIndepSet {V : Type u_1} {k l : ℕ} [Fintype V] (G : SimpleGraph V) (h : ramseyNumber k l ≤ Fintype.card V) :
(∃ (s : Finset V), G.IsNClique k s) ∨ ∃ (s : Finset V), G.IsNIndepSet l s

A graph with at least R(k, l) vertices has a k-clique or an l-independent set.

Ramsey numbers are symmetric: pass to the complement graph.

theorem SimpleGraph.ramseyNumber_succ_succ_le (a b : ℕ) :
ramseyNumber (a + 1) (b + 1) ≤ (a + b).choose a

Erdős–Szekeres: R(a + 1, b + 1) ≤ C(a + b, a), that is, R(k, l) ≤ C(k + l - 2, k - 1) for k, l ≥ 1 [ErdosSzekeres1935, pp. 466–467].

The diagonal upper bound R(k, k) ≤ C(2k - 2, k - 1) ≤ 4 ^ (k - 1).