Skip to main content
OlympiadHQ

Browse · MathNet

Print

The South African Mathematical Olympiad Third Round

South Africa counting and probability

Problem

Write either or in each of the cells of a -table, in such a way that there are exactly entries of each kind. Let the minimum of the absolute values of all row sums and all column sums be . Determine the largest possible value of .
Solution
Split the table into four smaller tables of size . The upper left quarter is now filled with s, the lower right quarter with s, and each of the remaining two quarters in a checkerboard pattern (if is odd, fill them in such a way that one of the quarters contains more s than s, and the other more s than s). If is even, then each of the rows and columns contains either s and s, or vice versa, so that . If is odd, then each of the rows and columns contains either s (s) and s (s), or s (s) and s (s); it follows that in this case.

Now we show that cannot be larger. If there is a row or column that contains as many s as s, then , and we are done. Otherwise, split the set of all rows and columns into two subsets: those that contain more s than s, and those that contain more s than s.

One of these two sets must contain at least elements. Without loss of generality, assume that there are at least rows and columns (of which are rows and columns) that contain more s than s. In each of these rows and columns, there are at least s and at most s. The total number of s in all these rows and columns is therefore at least where the last term accounts for those s that are possibly double-counted. Hence we have and thus, with , since by assumption. Hence we have , which completes the proof in the case that is even. If is odd, is impossible, since all row sums and all column sums must be even (sum of an even number of odd numbers), so that we must have .

We conclude that the largest possible value of is if is even and if is odd.
Final answer
Maximum M is n if n is even, and n − 1 if n is odd.

Techniques

Coloring schemes, extremal argumentsCounting two ways