Olympiad Maths Prep

Track / Stage 8 / 124 of 180 #1824 of 2000

Problem 1824

IMO Shortlist mid-range; USAMO P2/P5
Combinatorics Difficulty 8.6 Prove it Team Selection Test · Turkey

n3n \ge 3 boxes are placed around a circle. At the first step we choose some boxes. At the second step for each chosen box we put a ball into the chosen box and into each of its two neighbouring boxes. Find the total number of possible distinct ball distributions which can be obtained in this way. (All balls are identical.)

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

The answer is 2n32n/3+22^n - 3 \cdot 2^{n/3} + 2 for n=3kn = 3k and 2n2^n for n3kn \neq 3k. The number of possible box choices is 2n2^n. Let us examine cases when two or more different choices produce the same ball distribution. If different choices C1C_1 and C2C_2 produce the same distribution then these choices should not coincide on any two consecutive boxes. Otherwise C1C_1 and C2C_2 will coincide for all remaining boxes. Suppose that the boxes are numbered in clockwise order as 1,2,,n1, 2, \dots, n and the sum i+ji + j is defined in (mod nn). If in choice CC box mm is chosen we write C(m)=XC(m) = X, otherwise we write C(m)=YC(m) = Y. Thus, for two consecutive boxes m,m+1m, m + 1 there are four possibilities XX,XY,YX,YYXX, XY, YX, YY. Note that if C1(m)=XC_1(m) = X, C1(m+1)=XC_1(m+1) = X and C2(m)=YC_2(m) = Y, C2(m+1)=YC_2(m+1) = Y then C1C_1 and C2C_2 can not produce the same distribution, since box mm will contain different number of balls for C1C_1 and C2C_2. for these two choices. Therefore, there are at most three pairwise different choices producing the same distribution. It can be readily shown that if nn is a multiple of 33 then there are only two triples producing the same distribution:
C1=XXXXXXXXX C_1 = \dots X X X X X X X X X \dots
C2=XXXXXXXXX(1) C_2 = \dots X X X X X X X X X \dots \quad (1)
C3=XXXXXXXXX C_3 = \dots X X X X X X X X X \dots
C1=YYYYYYYYYY C_1 = \dots Y Y Y Y Y Y Y Y Y Y \dots
C2=YYYYYYYYY(2) C_2 = \dots Y Y Y Y Y Y Y Y Y \dots \quad (2)
C3=XYYYYYYYYY C_3 = \dots X Y Y Y Y Y Y Y Y Y \dots
In each of this two cases each choice can be obtained by shifting of any other one. Evidently if nn is not a multiple of 33 there is no any such triple.

Now let us examine the cases when exactly two choices produce the same distribution. Note that for C1C_1 and C2C_2 there are two consecutive boxes mm and m+1m+1 such that C1(m)C2(m)C_1(m) \neq C_2(m) and C1(m+1)C2(m+1)C_1(m+1) \neq C_2(m+1). Otherwise for some mm we have C1(m)=C2(m)C_1(m) = C_2(m), C1(m+2)=C2(m+2)C_1(m+2) = C_2(m+2), C1(m+4)=C2(m+3)C_1(m+4) = C_2(m+3), ... and consecutively C1C_1 will coincide with C2C_2. W.L.O.G. let C1(m)=XC_1(m) = X, C1(m+1)=YC_1(m+1) = Y and C2(m)=YC_2(m) = Y, C2(m+1)=XC_2(m+1) = X. Then we get C1(m+2)=C2(m+2)=ZC_1(m+2) = C_2(m+2) = Z, where ZZ is either XX or YY. Similarly, C1(m+3)=XC_1(m+3) = X, C1(m+4)=YC_1(m+4) = Y and C2(m+3)=YC_2(m+3) = Y, C2(m+4)=XC_2(m+4) = X. Then we get C1(m+5)=C2(m+5)=ZC_1(m+5) = C_2(m+5) = Z, where ZZ is either XX or YY. Continuing this way we get that starting from box mm the choices C1C_1 and C2C_2 are XYZ1XYZ2XYZ3XYZ4XYZ_1XYZ_2XYZ_3XYZ_4... and YXZ1YXZ2YXZ3YXZ4YXZ_1YXZ_2YXZ_3YXZ_4,... respectively. If nn is not multiple of 33 then we can not cyclically close this chain and will get a contradiction.
Thus, if nn is not a multiple of 33 there are no different choices producing the same distribution and the answer is 2n2^n.
If nn is a multiple of 33 then the positions of ZiZ_i can be determined in 33 ways. If for some choice Z1=Z2=Z3Z_1 = Z_2 = Z_3... then we get one of the six choices from (1) and (2). Therefore, for each of 3(2n/32)23 \cdot (2^{n/3} - 2) \cdot 2 choices there exists exactly one other choice producing the same distribution. Therefore, the answer is
2n66(2n/32)+63+62(2n/32)=2n32n/3+2. 2^n - 6 - 6 \cdot (2^{n/3} - 2) + \frac{6}{3} + \frac{6}{2} \cdot (2^{n/3} - 2) = 2^n - 3 \cdot 2^{n/3} + 2.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.