Maths Olympiad Prep

Library / /50 of 52

Combinatorics Difficulty 9.0 Shortlist Prove it Romania

Let nn be a positive integer and let QQ be an n×n×nn \times n \times n cube. A box is a subset of QQ of one of the forms 1×n×n1 \times n \times n, n×1×nn \times 1 \times n or n×n×1n \times n \times 1. Each 1×1×11 \times 1 \times 1 cell of QQ is coloured one of several many colours. Consider the colour set of each box (each colour listed once). There are 3n3n such, split into three nn-element collections, one for each of the three directions. It turns out that every colour set in any of the three collections appears in each of the other two collections. Under these conditions, determine, in terms of nn, the maximum number of colours QQ may bear.

Solution

The required maximum is n(n+1)(2n+1)/6n(n+1)(2n+1)/6 and is achieved, for instance, by colouring cells as described below. For each colour, we list the set of all cells bearing that colour:
* nn singletons of the form {(i,i,i)}\{(i, i, i)\}, where 1in1 \le i \le n;
* 3(n2)3\binom{n}{2} doubletons of the form {(i,j,j),(j,i,i)}\{(i, j, j), (j, i, i)\}, {(j,i,j),(i,j,i)}\{(j, i, j), (i, j, i)\} and {(j,j,i),(i,i,j)}\{(j, j, i), (i, i, j)\}, where 1i<jn1 \le i < j \le n; and
* 2(n3)2\binom{n}{3} triplets of the form {(i,j,k),(j,k,i),(k,i,j)}\{(i, j, k), (j, k, i), (k, i, j)\}, where 1i<j<kn1 \le i < j < k \le n or 1i<k<jn1 \le i < k < j \le n.

Thus, QQ bears exactly n+3(n2)+2(n3)=n(n+1)(2n+1)/6n + 3\binom{n}{2} + 2\binom{n}{3} = n(n+1)(2n+1)/6 colours, and it is easily seen that the rank ii boxes in the three directions all share the same colour set.

We will now show that, under the conditions in the statement, the number of colours QQ bears does not exceed n(n+1)(2n+1)/6n(n+1)(2n+1)/6.

Fix such a colouring and split the set CC of all colours in QQ into three subsets: The set C1C_1 of all colours that appear exactly once, the set C2C_2 of all colours that appear exactly twice, and the set C3C_3 of all colours that appear at least thrice. Let SiS_i be set of all cells in QQ bearing a colour in CiC_i. Since SiiCi|S_i| \ge i|C_i|,
C=C1+C2+C3S1+12S2+13S3=S1+S2+S33+4S1+S26=n33+4S1+S26, \begin{aligned} |C| &= |C_1| + |C_2| + |C_3| \le |S_1| + \frac{1}{2}|S_2| + \frac{1}{3}|S_3| \\ &= \frac{|S_1| + |S_2| + |S_3|}{3} + \frac{4|S_1| + |S_2|}{6} = \frac{n^3}{3} + \frac{4|S_1| + |S_2|}{6}, \end{aligned}
and it is therefore sufficient to show that 4S1+S2n(3n+1)4|S_1| + |S_2| \le n(3n+1).

To this end, we fix a box XX of the form 1×n×n1 \times n \times n and prove that 4XS1+XS23n+14|X \cap S_1| + |X \cap S_2| \le 3n + 1. Summing over all such boxes XX, we get the desired upper bound. Let YY and ZZ be n×1×nn \times 1 \times n and n×n×1n \times n \times 1 boxes, respectively, sharing the colour set of XX.

If XS1X \cap S_1 is non-empty, then a cell in this set also lies in both YY and ZZ, hence in XYZX \cap Y \cap Z. Consequently, XS1=XYZX \cap S_1 = X \cap Y \cap Z and XS1=1|X \cap S_1| = 1.

Consider now the cells in XS2X \cap S_2. There are at most (n1)+(n1)=2(n1)(n-1) + (n-1) = 2(n-1) such in the cross (XY)(XZ)(X \cap Y) \cup (X \cap Z), since the cell in XYZX \cap Y \cap Z is in S1S_1. Let now cc be any other cell in XS2X \cap S_2. Recall that there is only one other cell cc' in QQ sharing the colour of cc. Since YZY \cup Z does not contain cc, and YY and ZZ each contains a cell sharing its colour, it follows that they both contain cc'. And since the cell in XYZX \cap Y \cap Z is in S1S_1, the cell cc' lies in (YZ)X(Y \cap Z) \setminus X. The assignment ccc \mapsto c' is clearly injective, so the number of cells cc under current consideration does not exceed (YZ)X=n1|(Y \cap Z) \setminus X| = n-1. Consequently, XS22(n1)+(n1)=3(n1)|X \cap S_2| \le 2(n-1) + (n-1) = 3(n-1), and hence 4XS1+XS24+3(n1)=3n+14|X \cap S_1| + |X \cap S_2| \le 4 + 3(n-1) = 3n+1.

To deal with the case where XS1X \cap S_1 is empty, proceed similarly with minor changes. This time XS2X \cap S_2 contains at most 2n12n-1 cells from the cross (XY)(XZ)(X \cap Y) \cup (X \cap Z). To any other cell cc in XS2X \cap S_2 there corresponds a cell cc' in YZY \cap Z (not necessarily outside XX), so there are at most nn such. Consequently, XS2(2n1)+n=3n1|X \cap S_2| \le (2n-1) + n = 3n-1, a wee bit better than needed.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.