# Ramsey's theorem

Ramsey's theorem In combinatorial mathematics, Ramsey's theorem, in one of its graph-theoretic forms, states that one will find monochromatic cliques in any edge labelling (with colours) of a sufficiently large complete graph. To demonstrate the theorem for two colours (say, blue and red), let r and s be any two positive integers.[1] Ramsey's theorem states that there exists a least positive integer R(r, s) for which every blue-red edge colouring of the complete graph on R(r, s) vertices contains a blue clique on r vertices or a red clique on s vertices. (Here R(r, s) signifies an integer that depends on both r and s.) Ramsey's theorem is a foundational result in combinatorics. The first version of this result was proved by F. P. Ramsey. This initiated the combinatorial theory now called Ramsey theory, that seeks regularity amid disorder: general conditions for the existence of substructures with regular properties. In this application it is a question of the existence of monochromatic subsets, that is, subsets of connected edges of just one colour.

An extension of this theorem applies to any finite number of colours, rather than just two. More precisely, the theorem states that for any given number of colours, c, and any given integers n1, …, nc, there is a number, R(n1, …, nc), such that if the edges of a complete graph of order R(n1, …, nc) are coloured with c different colours, then for some i between 1 and c, it must contain a complete subgraph of order ni whose edges are all colour i. The special case above has c = 2 (and n1 = r and n2 = s).

Contents 1 Examples 1.1 R(3, 3) = 6 1.2 A multicolour example: R(3, 3, 3) = 17 2 Proof 2.1 2-colour case 2.2 Case of more colours 3 Ramsey numbers 3.1 Computational complexity 3.2 Known values 3.3 Asymptotics 4 Induced Ramsey 4.1 Statement 4.2 History and Bounds 4.3 Special Cases 4.4 Generalizations 4.4.1 More colors 4.4.2 Hypergraphs 5 Extensions of the theorem 5.1 Infinite graphs 5.1.1 Infinite version implies the finite 5.2 Hypergraphs 5.3 Directed graphs 6 Relationship to the axiom of choice 7 See also 8 Notes 9 References 10 External links Examples R(3, 3) = 6 A 2-edge-labeling of K5 with no monochromatic K3 Suppose the edges of a complete graph on 6 vertices are coloured red and blue. Pick a vertex, v. There are 5 edges incident to v and so (by the pigeonhole principle) at least 3 of them must be the same colour. Without loss of generality we can assume at least 3 of these edges, connecting the vertex, v, to vertices, r, s and t, are blue. (If not, exchange red and blue in what follows.) If any of the edges, (rs), (rt), (st), are also blue then we have an entirely blue triangle. If not, then those three edges are all red and we have an entirely red triangle. Since this argument works for any colouring, any K6 contains a monochromatic K3, and therefore R(3, 3) ≤ 6. The popular version of this is called the theorem on friends and strangers.

An alternative proof works by double counting. It goes as follows: Count the number of ordered triples of vertices, x, y, z, such that the edge, (xy), is red and the edge, (yz), is blue. Firstly, any given vertex will be the middle of either 0 × 5 = 0 (all edges from the vertex are the same colour), 1 × 4 = 4 (four are the same colour, one is the other colour), or 2 × 3 = 6 (three are the same colour, two are the other colour) such triples. Therefore, there are at most 6 × 6 = 36 such triples. Secondly, for any non-monochromatic triangle (xyz), there exist precisely two such triples. Therefore, there are at most 18 non-monochromatic triangles. Therefore, at least 2 of the 20 triangles in the K6 are monochromatic.

Conversely, it is possible to 2-colour a K5 without creating any monochromatic K3, showing that R(3, 3) > 5. The unique[a] colouring is shown to the right. Thus R(3, 3) = 6.

The task of proving that R(3, 3) ≤ 6 was one of the problems of William Lowell Putnam Mathematical Competition in 1953, as well as in the Hungarian Math Olympiad in 1947.

A multicolour example: R(3, 3, 3) = 17 The only two 3-colourings of K16 with no monochromatic K3. The untwisted colouring (above) and the twisted colouring (below).

A multicolour Ramsey number is a Ramsey number using 3 or more colours. There are (up to symmetries) only two non-trivial multicolour Ramsey numbers for which the exact value is known, namely R(3, 3, 3) = 17 and R(3, 3, 4) = 30.[2] Suppose that we have an edge colouring of a complete graph using 3 colours, red, green and blue. Suppose further that the edge colouring has no monochromatic triangles. Select a vertex v. Consider the set of vertices that have a red edge to the vertex v. This is called the red neighbourhood of v. The red neighbourhood of v cannot contain any red edges, since otherwise there would be a red triangle consisting of the two endpoints of that red edge and the vertex v. Thus, the induced edge colouring on the red neighbourhood of v has edges coloured with only two colours, namely green and blue. Since R(3, 3) = 6, the red neighbourhood of v can contain at most 5 vertices. Similarly, the green and blue neighbourhoods of v can contain at most 5 vertices each. Since every vertex, except for v itself, is in one of the red, green or blue neighbourhoods of v, the entire complete graph can have at most 1 + 5 + 5 + 5 = 16 vertices. Thus, we have R(3, 3, 3) ≤ 17.

To see that R(3, 3, 3) = 17, it suffices to draw an edge colouring on the complete graph on 16 vertices with 3 colours that avoids monochromatic triangles. It turns out that there are exactly two such colourings on K16, the so-called untwisted and twisted colourings. Both colourings are shown in the figures to the right, with the untwisted colouring on the top, and the twisted colouring on the bottom.

Clebsch graph If we select any colour of either the untwisted or twisted colouring on K16, and consider the graph whose edges are precisely those edges that have the specified colour, we will get the Clebsch graph.

It is known that there are exactly two edge colourings with 3 colours on K15 that avoid monochromatic triangles, which can be constructed by deleting any vertex from the untwisted and twisted colourings on K16, respectively.

It is also known that there are exactly 115 edge colourings with 3 colours on K14 that avoid monochromatic triangles, provided that we consider edge colourings that differ by a permutation of the colours as being the same.

Proof 2-colour case The theorem for the 2-colour case can be proved by induction on r + s.[3] It is clear from the definition that for all n, R(n, 2) = R(2, n) = n. This starts the induction. We prove that R(r, s) exists by finding an explicit bound for it. By the inductive hypothesis R(r − 1, s) and R(r, s − 1) exist.

Lemma 1. {displaystyle R(r,s)leq R(r-1,s)+R(r,s-1).} Proof. Consider a complete graph on R(r − 1, s) + R(r, s − 1) vertices whose edges are coloured with two colours. Pick a vertex v from the graph, and partition the remaining vertices into two sets M and N, such that for every vertex w, w is in M if edge (vw) is blue, and w is in N if (vw) is red. Because the graph has {displaystyle R(r-1,s)+R(r,s-1)=|M|+|N|+1} vertices, it follows that either {displaystyle |M|geq R(r-1,s)} or {displaystyle |N|geq R(r,s-1).} In the former case, if M has a red Ks then so does the original graph and we are finished. Otherwise M has a blue Kr − 1 and so {displaystyle Mcup {v}} has a blue Kr by the definition of M. The latter case is analogous. Thus the claim is true and we have completed the proof for 2 colours.

In this 2-colour case, if R(r − 1, s) and R(r, s − 1) are both even, the induction inequality can be strengthened to:[4] {displaystyle R(r,s)leq R(r-1,s)+R(r,s-1)-1.} Proof. Suppose p = R(r − 1, s) and q = R(r, s − 1) are both even. Let t = p + q − 1 and consider a two-coloured graph of t vertices. If di is degree of i-th vertex in the blue subgraph, then, according to the Handshaking lemma, {displaystyle textstyle sum _{i=1}^{t}d_{i}} is even. Given that t is odd, there must be an even di. Assume d1 is even, M and N are the vertices incident to vertex 1 in the blue and red subgraphs, respectively. Then both {displaystyle |M|=d_{1}} and {displaystyle |N|=t-1-d_{1}} are even. According to the Pigeonhole principle, either {displaystyle |M|geq p-1,} or {displaystyle |N|geq q.} Since |M| is even, while p – 1 is odd, the first inequality can be strengthened, so either {displaystyle |M|geq p} or {displaystyle |N|geq q.} Suppose {displaystyle |M|geq p=R(r-1,s).} Then either the M subgraph has a red Ks and the proof is complete, or it has a blue Kr – 1 which along with vertex 1 makes a blue Kr. The case {displaystyle |N|geq q=R(r,s-1)} is treated similarly.

Case of more colours Lemma 2. If c > 2, then {displaystyle R(n_{1},dots ,n_{c})leq R(n_{1},dots ,n_{c-2},R(n_{c-1},n_{c})).} Proof. Consider a complete graph of {displaystyle R(n_{1},dots ,n_{c-2},R(n_{c-1},n_{c}))} vertices and colour its edges with c colours. Now 'go colour-blind' and pretend that c − 1 and c are the same colour. Thus the graph is now (c − 1)-coloured. Due to the definition of {displaystyle R(n_{1},dots ,n_{c-2},R(n_{c-1},n_{c})),} such a graph contains either a Kni mono-chromatically coloured with colour i for some 1 ≤ i ≤ c − 2 or a KR(nc − 1, nc)-coloured in the 'blurred colour'. In the former case we are finished. In the latter case, we recover our sight again and see from the definition of R(nc − 1, nc) we must have either a (c − 1)-monochrome Knc − 1 or a c-monochrome Knc. In either case the proof is complete.

Lemma 1 implies that any R(r,s) is finite. The right hand side of the inequality in Lemma 2 expresses a Ramsey number for c colours in terms of Ramsey numbers for fewer colours. Therefore any R(n1, …, nc) is finite for any number of colours. This proves the theorem.

Ramsey numbers The numbers R(r, s) in Ramsey's theorem (and their extensions to more than two colours) are known as Ramsey numbers. The Ramsey number, R(m, n), gives the solution to the party problem, which asks the minimum number of guests, R(m, n), that must be invited so that at least m will know each other or at least n will not know each other. In the language of graph theory, the Ramsey number is the minimum number of vertices, v = R(m, n), such that all undirected simple graphs of order v, contain a clique of order m, or an independent set of order n. Ramsey's theorem states that such a number exists for all m and n.

By symmetry, it is true that R(m, n) = R(n, m). An upper bound for R(r, s) can be extracted from the proof of the theorem, and other arguments give lower bounds. (The first exponential lower bound was obtained by Paul Erdős using the probabilistic method.) However, there is a vast gap between the tightest lower bounds and the tightest upper bounds. There are also very few numbers r and s for which we know the exact value of R(r, s).

Computing a lower bound L for R(r, s) usually requires exhibiting a blue/red colouring of the graph KL−1 with no blue Kr subgraph and no red Ks subgraph. Such a counterexample is called a Ramsey graph. Brendan McKay maintains a list of known Ramsey graphs.[5] Upper bounds are often considerably more difficult to establish: one either has to check all possible colourings to confirm the absence of a counterexample, or to present a mathematical argument for its absence.

Computational complexity Erdős asks us to imagine an alien force, vastly more powerful than us, landing on Earth and demanding the value of R(5, 5) or they will destroy our planet. In that case, he claims, we should marshal all our computers and all our mathematicians and attempt to find the value. But suppose, instead, that they ask for R(6, 6). In that case, he believes, we should attempt to destroy the aliens.

— Joel Spencer[6] A sophisticated computer program does not need to look at all colourings individually in order to eliminate all of them; nevertheless it is a very difficult computational task that existing software can only manage on small sizes. Each complete graph Kn has 1 / 2 n(n − 1) edges, so there would be a total of cn(n-1)/2 graphs to search through (for c colours) if brute force is used.[7] Therefore, the complexity for searching all possible graphs (via brute force) is O(cn2) for c colourings and at most n nodes.

The situation is unlikely to improve with the advent of quantum computers. The best known algorithm[citation needed] exhibits only a quadratic speedup (c.f. Grover's algorithm) relative to classical computers, so that the computation time is still exponential in the number of nodes.[8] Known values As described above, R(3, 3) = 6. It is easy to prove that R(4, 2) = 4, and, more generally, that R(s, 2) = s for all s: a graph on s − 1 nodes with all edges coloured red serves as a counterexample and proves that R(s, 2) ≥ s; among colourings of a graph on s nodes, the colouring with all edges coloured red contains a s-node red subgraph, and all other colourings contain a 2-node blue subgraph (that is, a pair of nodes connected with a blue edge.) Using induction inequalities, it can be concluded that R(4, 3) ≤ R(4, 2) + R(3, 3) − 1 = 9, and therefore R(4, 4) ≤ R(4, 3) + R(3, 4) ≤ 18. There are only two (4, 4, 16) graphs (that is, 2-colourings of a complete graph on 16 nodes without 4-node red or blue complete subgraphs) among 6.4 × 1022 different 2-colourings of 16-node graphs, and only one (4, 4, 17) graph (the Paley graph of order 17) among 2.46 × 1026 colourings.[5] (This was proven by Evans, Pulham and Sheehan in 1979.) It follows that R(4, 4) = 18.

The fact that R(4, 5) = 25 was first established by Brendan McKay and Stanisław Radziszowski in 1995.[9] The exact value of R(5, 5) is unknown, although it is known to lie between 43 (Geoffrey Exoo (1989)[10]) and 48 (Angeltveit and McKay (2017)[11]) (inclusive).