Ramsey's theorem is a mathematical theorem in Ramsey theory. It states for any pair of positive integers (r,s) there exists an integer R(r,s) such that for any complete graph on R(r,s) vertices whose edges are coloured red or blue, there exists either a monochromatic complete subgraph on r vertices which is entirely blue or a monochromatic complete subgraph on s vertices which is entirely red.
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 colors c, and any given integers n_{1},...,n_{c}, there is a number, R(n_{1}, ..., n_{c}; c), such that if the edges of a complete graph of order R(n_{1}, ..., n_{c}; c) are colored with c different colors, then for some i between 1 and c, it must contain a complete subgraph of order n_{i} whose edges are all color i. The special case above has c = 2 (and n_{1} = r and n_{2} = s).

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 losing generality we can assume at least 3 of these edges, connecting to vertices r, s and t, are blue. (If not, exchange red and blue in what follows.) If any of the edges (r, s), (r, t), (s, t) are also blue then we have an entirely blue triangle. If not, then those three edges are all red and we have with an entirely red triangle. Since this argument works for any colouring any K_{6} contains a monchromatic K_{3} and therefore that R(3,3;2) ≤ 6.
Conversely, it is possible to 2colour a K_{5} without creating any monochromatic K_{3}, showing that R(3,3;2) > 5. The unique coloring is:
Thus R(3,3;2) = 6
We prove the theorem for the 2 colour case, by induction on r+s. It is clear from the pigeonhole principle that for all n, R(n,1) = R(1,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(r1,s) and R(r,s1) exist.
Claim: R(r,s) ≤ R(r1,s) + R(r,s1) + 1: Consider a complete graph on R(r1,s) + R(r,s1) + 1 vertices. Pick a vertex v from the graph and consider two subgraphs M and N where a vertex w is in M if and only if (v, w) is blue and is in N otherwise.
Now either M ≥ R(r1,s) or N ≥ R(r,s1), again by the pigeonhole principle. In the former case if M has a red K_{s} then so does the original graph and we are finished. Otherwise M has a blue K_{r1} and so M union {x} has blue K_{r} by definition of M. The latter case is analogous.
Thus the claim is true and we have completed the proof for 2 colours. We now prove the result for the general case of c colours. The proof is again by induction, this time on the number of colours c. We have the result for c=1 (trivially) and for c=2 (above). Now let c>2.
Claim: R(n_{1},...,n_{c};c) ≤ R(n_{1},...,n_{c2},R(n_{c1},n_{c};2);c1)
Proof: The righthand side of the inequality exists by inductive hypothesis. Consider a graph on this many vertices and colour it with c colours. Now 'go colourblind' and pretend that c1 and c are the same colour. Thus the graph is now (c1)coloured. By the inductive hypothesis, it contains either a K_{ni} monochromatically coloured with colour i for some 1 ≤ i ≤ (c2) or a K_{R(nc1,nc;2)} 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(n_{c1},n_{c};2) we must have either a (c1)monochrome K_{nc1} or a cmonochrome K_{nc}. In either case the proof is complete.
The theorem can also be extended to hypergraphs. An mhypergraph is a graph whose "edges" are sets of m vertices  in a normal graph an edge is a set of 2 vertices. The full statement of Ramsey's theorem for hypergraphs is that for any integers m and c, and any integers n_{1},...,n_{c}, there is an integer R(n_{1},...,n_{c};c,m) such that if the hyperedges of a complete mhypergraph of order R(n_{1},...,n_{c};c,m) are colored with c different colors, then for some i between 1 and c, the hypergraph must contain a complete submhypergraph of order n_{i} whose hyperedges are all color i. This theorem is usually proved by induction on m, the 'hyperness' of the graph. The base case for the proof is m=2, which is exactly the theorem above.
A further result, also commonly called Ramsey's theorem, applies to infinite graphs. In a context where finite graphs are also being discussed it is often called the "Infinite Ramsey theorem". As intuition provided by the pictoral representation of a graph is diminished when moving from finite to infinite graphs, theorems in this area are usually phrased in settheoretic terminology.
The theorem: Let X be some countably infinite set and colour the elements of X^{(n)} (the subsets of X of size n) in c different colours. Then there exists some infinite subset M of X such that the size n subsets of M all have the same colour.
Proof: To be completed
Search Encyclopedia

Featured Article
