Olympiad Maths Prep

Track / Stage 9 / 24 of 80 #1904 of 2000

Problem 1904

IMO P2/P5; hard shortlist
Combinatorics Difficulty 9.2 Prove it BMO 2022 shortlist · Balkan Mathematical Olympiad · 2022

A cube of side length 20212021 is given. In how many ways can we place a 1×1×11 \times 1 \times 1 cubelet on the border of this cube in such a way that the newly formed solid can be completely filled using k×1×1k \times 1 \times 1, 1×k×11 \times k \times 1 and 1×1×k1 \times 1 \times k cuboids, for some kN{1}k \in \mathbb{N} \setminus \{1\}?

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 solutions — 2

Solution 1

Suppose that for some k>1k > 1 and some placed cubelet there is a valid filling. In each unit cubelet (of the original cube) with coordinates (x,y,z)(x, y, z) where 0x,y,z20200 \le x, y, z \le 2020, we assign the complex number ωx+y+z\omega^{x+y+z} where ω=e2πik\omega = e^{\frac{2\pi i}{k}}. We also assign the number ωa+b+c\omega^{a+b+c} in the additional cubelet in position (a,b,c)(a, b, c).

Since 1+ω+ω2++ωk1=ωk1ω1=01 + \omega + \omega^2 + \dots + \omega^{k-1} = \frac{\omega^k - 1}{\omega - 1} = 0, then the sum of numbers in any 1×1×k1 \times 1 \times k cuboid is equal to zero. So the sum of all assigned numbers is equal to
0=(1+ω++ω2020)3+ωa+b+c.(1) 0 = (1 + \omega + \dots + \omega^{2020})^3 + \omega^{a+b+c}. \qquad (1)
This gives
1=ωa+b+c=(1+ω++ω2020)3=1ω20211ω3. 1 = |-\omega^{a+b+c}| = |(1 + \omega + \dots + \omega^{2020})^3| = \left|\frac{1 - \omega^{2021}}{1 - \omega}\right|^3.
Thus 1ω=1ω2021|1 - \omega| = |1 - \omega^{2021}| which means that 11 is equidistant from the numbers ω\omega and ω2021\omega^{2021}. Since ω2021=1|\omega^{2021}| = 1, this happens if and only if ω2021=ω\omega^{2021} = \omega or ω2021=ω1\omega^{2021} = \omega^{-1}. Then ω2020=1\omega^{2020} = 1 or ω2022=1\omega^{2022} = 1 which gives k2020k|2020 or k2022k|2022. However k20213+1k|2021^3 + 1. Since 20213+12mod20202021^3 + 1 \equiv 2 \mod 2020, if k2020k|2020 then k2k|2. So in any case we have k2022k|2022. Now (1) gives
ωa+b+c=(1+ω++ω2020)3=(ω2021)3=ω6063=ω3. \omega^{a+b+c} = -(1 + \omega + \dots + \omega^{2020})^3 = -(-\omega^{2021})^3 = \omega^{6063} = \omega^{-3}.
So a+b+c3modka + b + c \equiv -3 \mod k.
If we have a valid filling for kk, then we have a valid filling for every prime factor of kk. So we may assume that kk is prime and therefore k{2,3,337}k \in \{2, 3, 337\}.
Assume without loss of generality that the additional cubelet is at the bottom of the cube, i.e. c=1c = -1. Then a+b2modka + b \equiv -2 \mod k. By symmetry, if we have a valid filling for (a,b,1)(a, b, -1), then we have a valid filling for (2022a,b,1)(2022 - a, b, -1). So we must also have 2022a+b2modk2022 - a + b \equiv -2 \mod k and so ba2modkb - a \equiv -2 \mod k. Since also a+b2modka + b \equiv -2 \mod k we get ab1modka \equiv b \equiv -1 \mod k for k2k \neq 2 and abmod2a \equiv b \mod 2 for k=2k = 2. We will now show that the above necessary conditions are also sufficient to have a valid filling.
We claim first that a square defined by coordinates (x,y)(x, y) where 0x,y20200 \le x, y \le 2020, with a removed cell (a,b)(a, b) satisfying the above restrictions can be covered by 1×k1 \times k rectangles. This is because such a square can be covered by four rectangles of sizes (a+1)×b(a+1) \times b, (2020a)×(b+1)(2020-a) \times (b+1), (2021a)×(2020b)(2021-a) \times (2020-b) and a×(2021b)a \times (2021-b), where each of these rectangles can be covered by 1×k1 \times k rectangles. This follows since ka+1,b+1,2021a,2021bk | a+1, b+1, 2021-a, 2021-b if ab1modka \equiv b \equiv -1 \mod k and since 2b,2020a,2020b,a2|b, 2020-a, 2020-b, a if ab0mod2a \equiv b \equiv 0 \mod 2.
Now we fill the cube with the added cubelet as follows: The lowest k1k-1 "layers" of the original cube of side 20212021 are filled using the previous method together with a 1×1×k1 \times 1 \times k cuboid covering the holes in these layers and the additional cubelet. The remainder is the 2021×2021×(2022k)2021 \times 2021 \times (2022-k) cuboid which can be easily filled by 1×1×k1 \times 1 \times k cuboids because k2022kk | 2022-k.
To complete the solution, we need to count the number of ordered pairs (a,b)(a, b) with 0a,b20200 \le a, b \le 2020, such that abmod2a \equiv b \mod 2, or ab1mod3a \equiv b \equiv -1 \mod 3 or ab1mod337a \equiv b \equiv -1 \mod 337. There are 101121011^2 choices with ab0mod2a \equiv b \equiv 0 \mod 2 and 101021010^2 choices with ab1mod2a \equiv b \equiv 1 \mod 2. If ab1mod3a \equiv b \equiv -1 \mod 3 but abmod2a \neq b \mod 2 then one of a,ba, b must be congruent to 2mod62 \mod 6 and the other to 5mod65 \mod 6. There are 2×337×3362 \times 337 \times 336 such choices. Finally, if ab1mod337a \equiv b \equiv -1 \mod 337 but is not yet accounted for, then one of them is equal to {336,1010,1684}\{336, 1010, 1684\} and the other to {673,1347}\{673, 1347\}. (Note that in this case the second one is definitely not congruent to 1mod3-1 \mod 3.) There are 2×3×22 \times 3 \times 2 such choices. In total we have 22686972268697 choices for the pair (a,b)(a, b). Therefore, because of symmetry, the total number of ways is 6×2268697=136121826 \times 2268697 = 13612182.

Solution 2

Since there are a total of 20213+12021^3 + 1 cubelets and each cuboid covers kk of them, we must have k20213+1k|2021^3 + 1. We have
20213=2022(202122021+1)=2333737316271 2021^3 = 2022 \cdot (2021^2 - 2021 + 1) = 2 \cdot 3 \cdot 337 \cdot 3 \cdot 7 \cdot 31 \cdot 6271
as a product of prime factors.
If we have a valid filling for kk, then we have a valid filling for every prime factor of kk. So we may assume that kk is prime and therefore k{2,3,7,31,337}k \in \{2, 3, 7, 31, 337\}. (The case k=6271k = 6271 is easily seen to be impossible.)
We colour the cubelet at position (x,y,z)(x, y, z) for 0x,y,z20200 \le x, y, z \le 2020 by the colour x+y+zmodkx+y+z \bmod k. So every 1×1×k1 \times 1 \times k cuboid covers 1 cubelet of each colour.
If k=2k = 2 then it is easy to see that we have one more cubelet of the form 0mod20 \bmod 2 than of the form 1mod21 \bmod 2. So assuming that the additional cubelet is in position (a,b,1)(a, b, -1), we must have a+b0mod2a+b \equiv 0 \bmod 2 as in Solution 1.
If k=3k = 3 then, since it is each to cover all cubelets with 1×1×k1 \times 1 \times k cuboids except those of the form (x,y,z)(x, y, z) with 0x,y,z20 \le x, y, z \le 2, we see that there is one less cubelet of the form 0mod30 \bmod 3 than of the form 1,2mod31, 2 \bmod 3. So assuming that the additional cubelet is in position (a,b,1)(a, b, -1), we must have a+b2mod3a+b \equiv -2 \bmod 3. Exploiting the symmetry as in Solution 1 we get ab1mod3a \equiv b \equiv -1 \bmod 3.
If k=7k = 7 then note that (since 720167|2016) it is easy to cover all cubelets with 1×1×k1 \times 1 \times k cuboids except those of the form (x,y,z)(x, y, z) with 0x,y,z40 \le x, y, z \le 4. Note that exactly 19 of these cubicles have the colour 0mod70 \bmod 7. (3 when z=0z = 0, 3 when z=1z = 1, 4 when z=2z = 2, 5 when z=3z = 3 and 4 when z=4z = 4.) These are more than 53+17=18\frac{5^3+1}{7} = 18 so one of these will remain uncovered. So k=7k = 7 is impossible.
If k=31k = 31 then note that (since 31201531|2015) it is easy to cover all cubelets with 1×1×k1 \times 1 \times k cuboids except those of the form (x,y,z)(x, y, z) with 0x,y,z50 \le x, y, z \le 5. Note that only one of those cubelets has the colour 0mod310 \bmod 31. So even if the additional cubelet has the same colour it is still less than the 63+131=7\frac{6^3+1}{31} = 7 which are expected in a proper covering. So k=31k = 31 is impossible.
If k=337k = 337 then note that the square containing all cells of the form (x,y)(x, y) with 0x20200 \le x \le 2020 and 0y20210 \le y \le 2021 can be covered with 1×k1 \times k rectangles and so contains equal number of cells of each colour (thinking of z=0z = 0). In the column with y=2021y = 2021, the cells have in order the colours 1,0,1,,3modk-1, 0, 1, \dots, -3 \bmod k. So the colour 2modk-2 \bmod k appears one time less in that column and therefore one time more in the square of the form (x,y)(x, y) with 0x,y20200 \le x, y \le 2020. In the 'layer' above the extra colour is 1modk-1 \bmod k, then 0modk0 \bmod k and so on until 202024modk2020 - 2 \equiv -4 \bmod k. So in the original cube all colours appear an equal number of times except 3modk-3 \bmod k which appear one time less and must be the colour of the additional cubelet (a,b,1)(a, b, -1). Thus a+b2modka+b \equiv -2 \bmod k. Exploiting the symmetry as in Solution 1 we get ab1mod337a \equiv b \equiv -1 \bmod 337.
So we get the same necessary conditions as in Solution 1. The sufficiency of these conditions is proved in a similar way as in Solution 1.

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