Determine the greatest positive integer such that each square of the array can be painted either red or blue so that not all the squares at the intersection of any two rows and any two columns are the same colour. (From Finnish MO 2014.)
, 2016
Solution
For each row consider all pairs of squares from this row such that both squares are the same colour. From the condition of the problem it follows that no two rows can have any of these pairs in common. So, each pair can occur in at most one row. There are pairs altogether and the squares in each pair are either both red or both blue. So there are possible pairs.
On the other hand we can estimate the lowest possible number of same-colour pairs in each row. Suppose that a row contains red and blue squares. Then the number of same-colour pairs is equal to . This number can be bounded below by using the Quadratic-Arithmetic Means Inequality
Since the number of possible same-coloured pairs is at least as large as the total number of same-colour pairs in all the rows combined and we have bounded the number of same-colour pairs from below, we have
Solving the quadratic equation we see that . So, .
When the lower bound from above has the value of . This means that any colouring will create at least 4 same-colour pairs in each row. Since the number of possible pairs is and there are 5 rows, each row has to contain exactly 4 same-colour pairs. This can only happen when the row contains 3 squares of one colour and 2 squares of the other colour. Altogether we have to use all of the 10 red pairs and all of the 10 blue pairs. But the number of rows is odd. So, the number of squares of one colour will have to be greater than the number of squares of the other colour and the same will be true for the number of red pairs and the number of blue pairs. Hence, the array cannot be coloured as desired.

We have shown that the greatest positive integer with the desired property is .