# The Party Problem (Ramsey's Theorem)

(Difference between revisions)
 Revision as of 13:40, 20 July 2012 (edit)m ← Previous diff Revision as of 13:45, 20 July 2012 (edit) (undo)m Next diff → Line 148: Line 148: {{SwitchPreview|ShowMessage=1 - Lemma that will help us prove Ramsey's Theorem|HideMessage=Click to hide|PreviewText= |FullText= {{SwitchPreview|ShowMessage=1 - Lemma that will help us prove Ramsey's Theorem|HideMessage=Click to hide|PreviewText= |FullText= - '''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. + '''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.Wallis, W. D. A Beginner's Guide to Graph Theory. Boston: Birkhäuser, 2000. There's some new notation in the lemma statement that we should review before proceeding with the proof. ''K''''R''(''m,n'') is a complete graph ''K''''v'' that has ''v'' vertices, where ''v'' = ''R''(''m,n''). Since ''K''''R''(''m,n'') has a number of vertices equal to the Ramsey number ''R''(''m,n''), it is guaranteed to have a complete subgraph with ''m'' vertices painted in ''c''1 or ''n'' vertices painted in ''c''2. There's some new notation in the lemma statement that we should review before proceeding with the proof. ''K''''R''(''m,n'') is a complete graph ''K''''v'' that has ''v'' vertices, where ''v'' = ''R''(''m,n''). Since ''K''''R''(''m,n'') has a number of vertices equal to the Ramsey number ''R''(''m,n''), it is guaranteed to have a complete subgraph with ''m'' vertices painted in ''c''1 or ''n'' vertices painted in ''c''2. Line 175: Line 175: {{SwitchPreview|ShowMessage=2 - Proof of Ramsey's Theorem|HideMessage=Click to hide|PreviewText= |FullText= {{SwitchPreview|ShowMessage=2 - Proof of Ramsey's Theorem|HideMessage=Click to hide|PreviewText= |FullText= - '''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 ''k''-painting 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''. + '''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 ''k''-painting 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. 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.

## Revision as of 13:45, 20 July 2012

{{Image Description Ready |ImageName=The Party Problem |Image=PartyProbB.gif |ImageIntro=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? |ImageDescElem=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.

## Contents

### 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

 Fig. 1a In the case of 2 people, Adam and Ben, they can either know each other or not. Therefore, there is only one edge between them, indicating that they are either friends or strangers (Fig. 1a and 1b). Furthermore, since there are only 2 people, we cannot fulfill the minimum requirement of at least 3 people that are mutual friends or strangers. Fig. 1b

### Nontrivial Cases

 Fig. 2a When you invite a third person, Cam, you can form a set of 3 people. Let's say, for the sake of argument, that they all know each other (Fig. 2a), thereby satisfying the conditions of the party problem. Note that in Fig. 2a, the edges that connect the 3 vertices form a triangle with edges of the same color. This kind of triangle, called a monochromatic triangle, indicates that the 3 people represented by the vertices are either all mutual friends or mutual strangers. It appears that 3 people is the answer to the party problem; inviting 3 people allows you to form a set of 3 people that all know each other. However, you could also think of a case in which Adam and Ben know each other, but don't know Cam (Fig. 2b). If that is the case, you can't form a set of 3 people that are either friends or strangers. This is a good illustration of a counterexample to our claim that 3 people were enough to solve the party problem. We need to invite more than 3 people. In the next two cases, we will again use counterexample to show that inviting 4 or 5 people is still not enough. Fig. 2b

 Fig. 3 Your fourth guest is Dina. Let's use the same counterexample strategy we used for 3 people. Assume that 4 is a solution to the party problem. In order to find a counterexample to our assumption, we have to find a configuration such that there exist no red or blue monochromatic triangles. Such a configuration is shown in Fig. 3. The outer edges are colored blue, and the inner edges (the diagonals of the square) are colored red. There is no way that you could make a monochromatic triangle from the blue outer edges, or from the red inner edges. In other words, you can't form a set of 3 people that are all mutual friends or mutual strangers. We have found a counterexample, and therefore 4 is not an answer to the party problem. When you invite Elsa, the fifth guest, again assume that 5 people is an answer to the party problem. Let's use the same coloring strategy that we used for 4 people. As shown in Fig. 4, color the outer edges blue and the inner edges red. You still can't form a monochromatic triangle from either the blue outer edges or the red inner edges. Fig. 4 is a counterexample to our assumption, and therefore 5 people is not an answer. Fig. 4

### 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:

 To find a configuration that will not form a monochromatic triangle, try using the coloring strategy that we used for 4 and 5 people. In other words, color the outer edges blue and the inner edges red. Does this work? Nope. This configuration still contains red, monochromatic triangles.

 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 vice-versa, 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. |ImageDesc=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.

 A complete graph with 6 vertices (v = 6). Monochromatic subgraphs with 3 vertices will always exist in this graph. 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: $v \ge R(3,3)$. Since R(3,3) = 6, we can be specific and say that v ≥ 6. A complete graph with 7 vertices (v = 7). Since 7 ≥ R(3,3), monochromatic subgraphs with 3 vertices will always exist in this graph as well. This can be taken even further and applied to any complete graph. Say you pick 2 colors, c1 and c2, 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 c1-colored monochromatic, complete subgraph with at least m vertices or a c2-colored monochromatic, complete subgraph with at least n vertices: $v \ge R(m,n)$. 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. Subgraph H of graph K6 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 k-painting of Kv. 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: A 2-painting of K6 must contain monochromatic K3 subgraphs. Monochromatic K3

## 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 3-painting of a graph? In a 4-painting? 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 KR(m,n) in 2 colors c1 and c2 contains either a Km with all its edges in c1 or a Kn with all its edges in c2.[1]

There's some new notation in the lemma statement that we should review before proceeding with the proof. KR(m,n) is a complete graph Kv that has v vertices, where v = R(m,n). Since KR(m,n) has a number of vertices equal to the Ramsey number R(m,n), it is guaranteed to have a complete subgraph with m vertices painted in c1 or n vertices painted in c2.

So for example, as we saw before, R(3,3) ≥ 6. That means that $K_{R(m,n)} = K_{R(3,3)} = K_6$. (Or K7. Or any Kv where v ≥ 6, really.)

Now, we have to prove that this R(m,n) exists for every m and n, not just m = n = 3.

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 K2 (Fig. 5), there are 2 possible configurations. The two vertices are connected by either a c1-colored edge or a c2-colored edge. Notice that there will always be either a monochromatic c1-colored subgraph with 2 vertices, or a monochromatic c2-colored subgraph with 2 vertices. Therefore, the Ramsey number for the base case exists, and is R(2,2) = 2. Fig. 5

R(2,2) is our base case. Both m = n = 2. We will perform induction on m + n = 4.

1. As we just demonstrated, the Lemma holds for the base case, when m + n = 4.
2. Assume that the Lemma is true when m + n < Q. Now take two positive integers M and N that add up to Q. If M + N = Q, then M + N - 1 < Q. Therefore, both R(M - 1, N) and R(M, N - 1) exist.
3. Say we have a graph Kv painted in c1 and c2 colors, where vR(M - 1, N) + R(M, N - 1). To visualize this, think of a simple example: K6. Since it has 6 vertices, let's "split it up" into two graphs with 3 vertices each so that we can model vR(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 c1 or R(M, N - 1) edges of c2. In the former case, the vertices that are connected to x by edges colored in c1 form a subgraph KR(M - 1, N). Now let's look at this subgraph in isolation and repaint it in colors c1 and c2. Because we are assuming that the Ramsey number R(M - 1, N) exists, the subgraph contains either:

- a KM - 1 with edges colored in c1 that, together with the additional vertex x, form a KM, or
- a KN whose edges are all colored in c2.

Either way, we have demonstrated that KR(M - 1, N), and by extension Kv, contain a monochromatic subgraph in either c1 or c2.
4. 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 2-painting of Kv. In the following proof, we will generalize our results to show that monochromatic subgraphs of any shape exist in any k-painting of Kv. In other words, a Ramsey Number exists for every complete graph, regardless of the number of colors in which the graph is painted.

{{SwitchPreview|ShowMessage=2 - Proof of Ramsey's Theorem|HideMessage=Click to hide|PreviewText= |FullText= Theorem: G1, G2, …, Gk, are any k graphs. There exists an integer R(G1, G2, …, Gk) such that, when vR(G1, G2, …, Gk), a k-painting of Kv must contain a subgraph that is isomorphic to Gi and monochromatic in color i, for some i where 1 ≤ ik.[1]