Skip to main content
OlympiadHQ

Browse · MathNet

Print

Czech-Polish-Slovak Mathematical Match

counting and probability

Problem

Each of the unit squares of a board () has been colored blue or red. A set of four different unit squares of the board is called pretty if these squares can be labeled in such a way that and lie in the same row, and lie in the same row, and lie in the same column, and lie in the same column, and are blue, and and are red. Determine the largest possible number of different pretty sets on such a board.

(Poland)
Solution
Let us index the unit squares of the board by pairs of integers with . We prove that the largest possible number of pretty sets is .

For the upper bound, consider coloring all the unit squares with or blue, and all the other unit squares red. It is straightforward to verify that this coloring yields pretty sets. Thus we are left with proving that no coloring yields more pretty sets.

Call an unordered pair of distinct unit squares mixed if and are in the same row and and have different colors. Clearly, if a row contains blue squares and red squares (), then it contains mixed pairs. Therefore, there are at most mixed pairs in total.

Let every mixed pair charge the unordered pair of distinct columns such that is in column and is in column . Denote by the number of times the pair of columns is charged.

Obviously, every pair of columns is charged at most times, i.e., . Moreover, since there are at most mixed pairs in total, we have where the summation is over pairs of distinct columns .

Observe that if a pair of distinct columns is charged times, then there are at most pretty sets with squares contained in these columns. This is because for some with there are red-blue and blue-red mixed pairs within these columns, yielding pretty sets. Therefore, the total number of pretty sets is at most where again the summation is over unordered pairs of distinct columns. This concludes the proof.
Final answer
n^4

Techniques

Counting two waysColoring schemes, extremal argumentsQM-AM-GM-HM / Power Mean