27 points are arranged in 9 columns and 3 rows, and each is coloured blue or red. Prove that there exists a rectangle whose vertices are all of the same colour.
Solution
Consider the grid, with each point coloured blue or red.
For each row, consider the sequence of colours in the 9 columns. For a fixed row, there are possible colourings. However, we only have 3 rows.
Now, focus on the columns. For each column, consider the triple of colours in the 3 rows. Each column can be coloured in ways.
Let us fix the rows and consider the columns. For each row, there are 9 points, each coloured blue or red. For each row, select the set of columns where the point is blue (or red). For a fixed pair of columns, consider the colours in the three rows at those columns.
Let us fix two columns, say columns and (). For each row, the pair can be , , , or , where is blue and is red.
Now, for each row, record the colour pair in columns and . Since there are 3 rows, there are possible assignments of colour pairs for the three rows.
Now, by the pigeonhole principle, consider the following:
Let us fix two columns, say columns and . For each row, look at the colour of the point in column and the colour in column . There are 3 rows, so for each row, the pair can be , , , or .
Suppose that in some two rows, say row and row , the colour in column is the same, and the colour in column is the same, and both are blue (or both are red). Then, the four points , , , these form the vertices of a rectangle, and all four are the same colour.
But more generally, for each pair of columns, consider the 3 pairs of colours in the 3 rows. If, for some colour (say blue), both columns and have blue in two different rows, then the rectangle formed by those two rows and those two columns has all blue vertices.
Alternatively, consider the following argument:
For each row, there are 9 points, each coloured blue or red. For each row, there are possible colourings. But we have only 3 rows.
Let us fix the rows and consider the columns. For each column, there are 3 points, each coloured blue or red, so possible colourings per column. There are 9 columns.
Now, for each row, consider the set of columns where the point is blue. For a fixed row, there are ways to have blue points.
But the key is to use the following classic Ramsey-type argument:
Consider any two rows. For each column, the pair of colours in those two rows can be , , , or . There are 9 columns, and 4 possible pairs per column.
Now, by the pigeonhole principle, among the 9 columns, there must be at least 3 columns where the pair is the same. That is, for some pair of rows, there are at least 3 columns where the colour in both rows is the same (either both blue or both red).
But actually, let's formalize the argument:
Let us fix two rows, say row 1 and row 2. For each column, the pair can be , , , or . There are 9 columns, and 4 possible pairs.
By the pigeonhole principle, there must be at least columns where the pair is the same.
But we need to find a rectangle with all four vertices the same colour.
Let us use the following approach:
For each row, consider the sequence of colours in the 9 columns. There are possible colourings per row. Since there are only 3 rows, there are at most 3 different colourings among the rows.
Now, consider the 9 columns. For each column, the sequence of colours in the 3 rows is a triple, which can be any of 8 possibilities.
Now, consider the following: For each pair of columns, consider the 3 pairs of colours in the 3 rows. If, for some colour, say blue, in two different rows, both columns have blue, then the rectangle formed by those two rows and those two columns has all blue vertices.
This is a classic application of the pigeonhole principle and Ramsey theory. In fact, the result is a special case of the theorem that in any grid coloured with two colours, if and are large enough, there must be a monochromatic rectangle.
In this case, with 3 rows and 9 columns, the result holds.
Therefore, there must exist a rectangle whose vertices are all of the same colour.