The Party Problem (Ramsey's Theorem)
From Math Images
The Party Problem 

The Party Problem
 You're going to throw a party, but haven't yet decided whom to invite. How many people do you need to invite to guarantee that at least m people will all know each other, or at least n people will all not know each other?
Contents 
Basic Description
Imagine that the next party you throw is, in secret, a mathematical experiment to find a solution to the party problem. Exhausted after planning, cooking, and setting up, you fall onto the couch and have some downtime to analyze the situation. Here is the question that we want to answer:How many people do you need to invite to make sure that at least 3 people will be mutual friends, or at least 3 people will be mutual strangers? Because you have limited food, you want to find the fewest number of people you can invite while still satisfying these conditions.
Trivial Case
Note: From here on out,
 blue edges will connect two vertices to represent that the people are mutual acquaintances
 red, dashed edges will connect two vertices to represent that the people are mutual strangers
Nontrivial Cases
A More Complicated Case
Until now, it has been relatively easy to come up with counterexamples to prove that 3, 4, or 5 people are not enough to guarantee that at least 3 people will be mutual friends or strangers. When you invite a sixth person, Fiona, it becomes a little more complicated. We can think of various cases in which 6 seems to be an answer. In the following cases, there is always a monochromatic triangle:
Just because there are many configurations that suggest 6 is the answer, however, doesn't prove that it is. We have to apply a more general proof to show that, no matter what, in any set of 6 people, 3 people will be mutual friends or mutual strangers. To do this, we will try to find a configuration that does not produce any monochromatic triangles, and then realize it is impossible to do so. First, let's reconfigure the vertices so that the problem is easier to model—we will only draw the edges that originate at vertex A (see left). To begin with, let's assume that all of these edges are blue. Later on, we'll see that it doesn't matter what color these edges are.  
 
Remember that we are trying to find a configuration that does not produce any monochromatic triangles. Look at the triangle that would be formed by vertices A, B, and C. Since edges AB and AC are blue, we would have to make BC red to prevent triangle ABC from becoming monochromatic. Likewise, in triangle ACD, since edges AC and AD are blue, edge CD must be red.  
 
Now, look at the triangle that would be formed by vertices A, B, and D. Since edges AB and AD are blue, edge BD must be red to avoid a monochromatic triangle. Even though we avoided creating a blue monochromatic triangle, we are eventually forced to form a red monochromatic triangle that has the vertices B, C, and D.  
 
This holds true even if we change our initial assumption that all the edges emanating from A are blue. If edge AE were red, edge AF were red, or both edges AE and AF were red, our end results would not change. This is because these are trivial changes to the configuration. We didn't use or consider edges AE and AF when we formed the monochromatic triangle BCD, so changing their colors has no effect on triangle BCD.  
 
Now what about nontrivial changes to the configuration? Say we change edge AD from blue to red. If AD isn't blue, we can no longer put a constraint on edge CD—it can be either red or blue. It is no longer guaranteed that triangle BCD is monochromatic.  
 
Let's look at this new configuration again. Edges AC and AF are blue, so edge CF must be red to prevent triangle ACF from becoming a blue monochromatic triangle. Edges AB and AF are blue, so edge BF must be red to prevent triangle ABF from becoming blue and monochromatic. Sound familiar? We are, once again, forced to form a red monochromatic triangle (triangle BCF).  
 
Even if we make a nontrivial change to the configuration and change edge AC from blue to red, we are still forced to form the red monochromatic triangle BEF. 
Because we failed to find any case in which there exists no monochromatic triangle, we have proven that 6 vertices is a solution to the party problem for the following configurations: 5 blue and 0 red edges, 4 blue and 1 red edge, and 3 blue and 2 red edges. What about the other configurations? The remaining configurations are (0 blue, 5 red), (1 blue, 4 red), and (2 blue, 3 red). We can obtain the diagrams for these configurations by simply flipping the colors in the three proven configurations. For example, when the blue is replaced with red and viceversa, the diagram for (5 blue, 0 red) becomes the diagram for (0 blue, 5 red).  
(5 blue, 0 red) & (0 blue, 5 red)  (4 blue, 1 red) & (1 blue, 4 red)  (3 blue, 2 red) & (2 blue, 3 red) 
Since we have demonstrated that any configuration of 6 people will always contain a monochromatic triangle, our results can be generalized to all cases. 
Finally, we've arrived at an answer to the party problem: To guarantee that at least 3 people will be mutual friends or mutual strangers, you must invite a minimum of 6 people to the party.
A More Mathematical Explanation
 Note: understanding of this explanation requires: *Graph Theory
The answer we just found is called a Ramsey number. In the simplistic terms of the party proble [...]
The answer we just found is called a Ramsey number. In the simplistic terms of the party problem, a Ramsey number R(m,n) is the minimum number of people you must invite so that at least m people will be mutual friends or at least n people will be mutual strangers. In the previous case, we proved that 6 is a Ramsey number when you want at least 3 people to be either mutual friends or mutual strangers. In other words, R(3,3) = 6.
So how does the party problem connect to graph theory? The transition from parties to graphs is simple—in fact, we've been modeling the invited people as the vertices of a graph already. We figured out earlier that the graph must have at least 6 vertices to guarantee that either a blue, monochromatic, complete subgraph with 3 vertices or a red, monochromatic, complete subgraph with 3 vertices exists. The constraint on the number of vertices v is denoted as follows:
Since R(3,3) = 6, we can be specific and say that v ≥ 6.  
This can be taken even further and applied to any complete graph. Say you pick 2 colors, c_{1} and c_{2}, and paint a graph with those colors (we previously picked blue and red). The Ramsey number is the minimum number of vertices that that graph must have to ensure that there exists either a c_{1}colored monochromatic, complete subgraph with at least m vertices or a c_{2}colored monochromatic, complete subgraph with at least n vertices:
As we will see later on, there is a Ramsey number for all complete graphs—there exists an R(3,4), R(4,4), etc.  
To put it in more formal terms, take a complete graph K with v vertices that has its edges painted in k colors. We call this a kpainting of K_{v}. A subgraph H of K is monochromatic if all its edges are painted with the same color. Therefore, our previous results can be expanded as follows:

Ramsey's Theorem
Until now, we have only considered painting graphs with 2 colors. What if we paint a graph with more than 2 colors? Can we still guarantee that monochromatic, complete subgraphs will exist in a 3painting of a graph? In a 4painting? The short answer is yes. Ramsey's Theorem, which generalizes the notion of Ramsey numbers, states that if you take a sufficiently large graph and paint it in any k colors, there must always exist monochromatic, complete subgraphs.
Graphical Proof
First, let's look at the case for painting with 2 colors. We previously demonstrated that R(3,3) exists. We will now prove that any R(m,n) always exists.
Lemma for Painting a Graph with 2 Colors: An integer R(m,n) exists such that any painting of K_{R(m,n)} in 2 colors c_{1} and c_{2} contains either a K_{m} with all its edges in c_{1} or a K_{n} with all its edges in c_{2}.
Proof: We need to find the base case, so that we can perform induction on it. Remember the first, trivial case that we covered in the basic description? All we need to do this start from this case, because it is the most basic.
In K_{2} (Fig. 5), there are 2 possible configurations. The two vertices are connected by either a c_{1}colored edge or a c_{2}colored edge. Notice that there will always be either a monochromatic c_{1}colored subgraph with 2 vertices, or a monochromatic c_{2}colored subgraph with 2 vertices. Therefore, the Ramsey number for the base case exists, and is R(2,2) = 2. 
R(2,2) is our base case. Both m = n = 2. We will perform induction on m + n = 4.
 As we just demonstrated, the Lemma holds for the base case, when m + n = 4.
 Assume that the Lemma is true when m + n < P. Now take two positive integers M and N that add up to P. If M + N = P, then M + N  1 < P. Therefore, both R(M  1, N) and R(M, N  1) exist.
 Say we have a graph K_{v} painted in c_{1} and c_{2} colors, where v ≥ R(M  1, N) + R(M, N  1). To visualize this, think of a simple example: K_{6}. Since it has 6 vertices, let's "split it up" into two graphs with 3 vertices each so that we can model v ≥ R(M  1, N) + R(M, N  1) as v ≥ 3 + 3:
There is a give and take between the two colors; if you have less than 3 edges of blue, you will have more than 3 edges of red, and vice versa. This means that you will always have at least 3 edges of blue or 3 edges of red.
To generalize this, if you select any vertex x, it is guaranteed that x will either lie on R(M  1, N) edges of c_{1} or R(M, N  1) edges of c_{2}. In the former case, the vertices that are connected to x by edges colored in c_{1} form a subgraph K_{R(M  1, N)}. Now let's look at this subgraph in isolation and repaint it in colors c_{1} and c_{2}. Because we are assuming that the Ramsey number R(M  1, N) exists, the subgraph contains either:
 a K_{M  1} with edges colored in c_{1} that, together with the additional vertex x, form a K_{M}, or
 a K_{N} whose edges are all colored in c_{2}.
Either way, we have demonstrated that K_{R(M  1, N)}, and by extension K_{v}, contain a monochromatic subgraph in either c_{1} or c_{2}.  Therefore, by induction, we have proved that R(M,N) exists.
By proving the lemma, we have shown that monochromatic, complete subgraphs always exist in a 2painting of K_{v}. In the following proof, we will generalize our results to show that monochromatic subgraphs of any shape exist in any kpainting of K_{v}. In other words, a Ramsey Number exists for every complete graph, regardless of the number of colors in which the graph is painted.
Theorem: G_{1}, G_{2}, …, G_{k}, are any k graphs. There exists an integer R(G_{1}, G_{2}, …, G_{k}) such that, when v ≥ R(G_{1}, G_{2}, …, G_{k}), a kpainting of K_{v} must contain a subgraph that is isomorphic to G_{i} and monochromatic in color i, for some i where 1 ≤ i ≤ k.
Let's break this theorem down into an identical but simpler statement. Say you have an arbitrary number of graphs (G_{1}, G_{2}, …, G_{k} ). If you have a complete graph (K_{v} ) that meets certain specifications, and you paint it with k colors, you are guaranteed to have monochromatic subgraphs within K_{v} that are identical to the arbitrary graphs you started with. The specifications for the complete graph are that it must have a number of vertices greater than or equal to the Ramsey number (R(G_{1}, G_{2}, …, G_{k}) ). The theorem states that such a Ramsey number always exists, no matter what arbitrary graphs and colors you pick.
 This builds upon the lemma we just proved, which had limited results:
 Point 1: We showed that a Ramsey number R(G_{1}, G_{2}) always exists. We only proved this for when the G_{1} and G_{2} are complete graphs.
 Point 2: We tested for only 2 colors, c_{i}, for some i where i = 1 or 2.
 As you saw in the theorem's statement, we will now expand on both of these points. We will see that the graphs G_{k} do not have to be complete, and that we can color a sufficiently large K_{v} with more than 2 colors and still find monochromatic subgraphs.
A word on notation before we start:
 The number of vertices in G_{i} is denoted as v(G_{i}).
 The notation G_{k} does not necessarily mean that the graph G has k vertices. It can be any graph. Instead, we use v(G_{k}) to indicate the size of the monochromatic subgraph we are looking for, just as R(3,3) meant that we were looking for a monochromatic, complete subgraph with 3 vertices.
 If all the graphs are complete graphs, i.e. G_{1} = K_{p1}, G_{2} = K_{p2}, ..., G_{k} = K_{pk} , then R(K_{p1}, K_{p2}, ..., K_{pk}) is rewritten as R(p_{1}, p_{2}, ..., p_{k}).
Proof:
Expanding Point 1
K_{v(Gi)} is the complete graph that has the same amount of vertices as does G_{i}. Proving the theorem for K_{v(Gi)} implies the proof for G_{i}. To see why, say that v is large enough that a kpainted K_{v} contains a monochromatic K_{v(Gi)} in color c_{i} :
3painted K_{7}....  ...contains blue monochromatic K_{v(Gi)}.  K_{v(Gi)} (isomorphic to K_{5}) 
The number of edges in K_{v(Gi)} is greater or equal to the number of edges in G_{i} :
K_{v(Gi)}...  ...contains G_{i} 
It necessarily follows that if K_{v} contains a monochromatic K_{v(Gi)} in color c_{i}, it will also contain a monochromatic G_{i} in the same color. In other words:
This is why it is sufficient to prove this theorem for the case in which all G_{i} are complete graphs.
Expanding Point 2
In order to prove that R(p_{1}, p_{2}, ..., p_{k}) always exists, we will perform an induction on k.
We previously saw the proof for the basic case, k = 2, in the Lemma. Now assume that for k < Q, R(p_{1}, p_{2}, ..., p_{k}) exists. Then if the integers p_{1}, p_{2}, ..., p_{Q} are given, R(p_{1}, p_{2}, ..., p_{Q  1}) exists.
Let's take the graph K_{v}, where v ≥ R ( R(p_{1}, p_{2}, ..., p_{Q  1}), p_{Q} ). We know that the Ramsey number R ( R(p_{1}, p_{2}, ..., p_{Q  1}), p_{Q} ) exists, due to the lemma we proved before. We already assumed that R(p_{1}, p_{2}, ..., p_{Q  1}) exists in the previous step.
Now take this K_{v} and paint it in any k colors. Here's the induction step: let's say that k = Q.
For all edges painted in a color other than c_{k}, temporarily assign a new color c_{m}. This creates a 2painting, which we already know how to analyze! The repainted graph must contain either a K_{R(p1, p2, ..., pQ  1)} monochromatic subgraph in color c_{m} or a K_{pQ} monochromatic subgraph in color c_{Q}.
Take the former subgraph, K_{R(p1, p2, ..., pQ  1)}, and look at it in the original painting (before its edges were recolored to c_{m}). It has edges in colors c_{1}, c_{2}, ..., c_{Q  1} only. Therefore, by induction, it contains a K_{pi} monochromatic in color c_{i} for some i.
Ramsey Numbers
It is extremely difficult to compute Ramsey numbers for increasingly larger graphs. Many of the Ramsey numbers have been determined by using exhaustive computer algorithms that compute a range of numbers, given values for m and n.
Why It's Interesting
Impossibility of Disorder
Total disorder in a graph is impossible. To extend the party metaphor, imagine that you invite more than 6 people. Regardless of how many people you invite, there will always be at least 3 people who are mutual friends or acquaintances.
Take any infinite graph you'd like. If you color it with an arbitrary, finite number of colors, there will always exist monochromatic subgraphs. So no matter how you color the graph, there will always be pockets of order.
There will always be an island of order in random, infinite chaos. Sounds quite poetic, right?
More generally: Regardless of the size of a system, if it's partitioned arbitrarily into subsystems, at least one subsystem will have a property that is shared by its constituents (monochromaticism, for example).
Teaching Materials
 There are currently no teaching materials for this page. Add teaching materials.
References
Ryser, Hervert John. The Carus Mathematical Monographs: Combinatorial Mathematics. Vol. Fourteen. Rahway: Quinn & Boden Company, Inc., 1963.
Wallis, W. D. A Beginner's Guide to Graph Theory. Boston: Birkhäuser, 2000.
Caldwell, Chris. "Graph Theory Glossary." Graph Theory Glossary. 19 June 2012 <http://primes.utm.edu/cgibin/caldwell/tutor/graph/glossary.html>.
"Ramsey's theorem." Wikipedia. 18 June 2012. 19 June 2012 <http://en.wikipedia.org/wiki/Ramsey%27s_theorem#Extensions_of_the_theorem>.
Weisstein, Eric W. "Ramsey Number." MathWorldA Wolfram Web Resource. 19 June 2012 <http://mathworld.wolfram.com/RamseyNumber.html>.
Leave a message on the discussion page by clicking the 'discussion' tab at the top of this image page.