Maths Olympiad Prep

Library / /15 of 16

Combinatorics Difficulty 7.8 National olympiad, round 2 Prove it Japan

Alice plays a game using a board with 20 rows and 25 columns. Initially, no number is written in any of the 20×2520 \times 25 cells. The game proceeds in several turns, and on the nn-th turn, the following operation is performed:
Choose a positive integer kk and kk empty cells A1,A2,,AkA_1, A_2, \dots, A_k such that for every integer ii with 1ik11 \le i \le k-1, the cell Ai+1A_{i+1} is adjacent to AiA_i either to the right or above. Write the number nn in each of these kk cells.
The game ends when all cells on the board are filled with some numbers. When Alice plays optimally to minimize the number of turns until the game ends, how many different possible numberings of the board can be obtained when the game ends?
Note: Numberings that are identical under rotation or reflection are considered distinct and counted as different.

Solution

20!320!^3

Let kk and ll be positive integers. We denote by (k,l)(k, l) the cell in the kk-th column from the left and the ll-th row from the bottom. For the cell (k,l)(k, l), we define its height as k+l1k + l - 1. Note that the possible values for the height of a cell range from 1 to 44. For each integer 1i441 \le i \le 44, the sequence formed by the numbers written in the cells of height ii, listed from the upper-left to the lower-right, is called the *level-ii sequence* or *level sequence of height ii*.

In the operation, for the chosen cells A1,,AkA_1, \dots, A_k, the height of Ai+1A_{i+1} is one more than that of AiA_i for every 1ik11 \le i \le k-1. In particular, the following properties hold:
(1) For every 1i441 \le i \le 44, the level-ii sequence contains no repeated numbers.
(2) Let pp and qq be integers with 1p<q441 \le p < q \le 44, and let nn be a positive integer. If there are cells of height pp and qq with the number nn written in them, then for every integer ii with piqp \le i \le q, there exists a cell of height ii that has the number nn written in it.
(3) Let ii and nn be positive integers. If there exist cells of height ii and i+1i+1 that both have the number nn written in them, then these two cells are adjacent.

Since there are 20 cells of height 20, Alice must perform at least 20 turns. Conversely, in the nn-th turn (1n201 \le n \le 20), if Alice chooses k=25k=25 and Ai=(i,n)A_i = (i, n) for 1i251 \le i \le 25, she can fill the entire board in exactly 20 turns. Therefore, the minimum number of turns is 20.

From now on, we consider the possible numberings when the game ends in exactly 20 turns.
In this case, since only the numbers 1 through 20 are filled, by (1), the level-20 sequence must be a permutation of 1, 2, ..., 20.

Lemma 1. The level sequences of height 20, 21, ..., 25 are all identical.
Proof. Since there are also 20 cells of each height 21, 22, 23, 24, and 25, by the same reason as in the case of height 20, the level sequences of height 20, 21, ..., 25 are all permutations of 1, 2, ..., 20.
Let ll be the first term of the level-20 sequence. That is, ll is the number written in the cell (1,20)(1, 20). Then, by (3), the cell of height 21 in which ll is written must be (2,20)(2, 20).
Let mm be the second term of the level-20 sequence. That is, mm is the number written in the cell (2,19)(2, 19). Then, by (3), the possible cells of height 21 where mm could be written are (2,20)(2, 20) or (3,19)(3, 19). However, since ll is already written in (2,20)(2, 20), mm must be written in (3,19)(3, 19).
Continuing this consideration, for every integer kk with 1k201 \le k \le 20, it turns out that the cell (k+1,21k)(k+1, 21-k) contains the kk-th term of the level-20 sequence. Therefore, the level-21 sequence is identical to the level-20 sequence. Similarly, the level sequences of heights 22, 23, 24, and 25 are also identical to it. ■

Lemma 2. For each integer 1i191 \le i \le 19, the level-ii sequence is equal to the sequence obtained from the level-(i+1)(i+1) sequence by deleting exactly one term while preserving the order.
Proof. Suppose that nn appears in the level-ii sequence. Since the level-20 sequence is a permutation of 1,2,,201, 2, \dots, 20, the number nn also appears in the level-20 sequence. Therefore, by (2), nn must also appear in the level-(i+1)(i+1) sequence. This shows that exactly one number appears in the level-(i+1)(i+1) sequence but not in the level-ii sequence. Let this number be the jj-th term of the level-(i+1)(i+1) sequence.
Then, by applying the same argument in the proof of Lemma 1 in the order k=1,2,,j1k = 1, 2, \dots, j-1, we can show that for any integer kk with 1kj11 \le k \le j-1, the kk-th term of the level-ii sequence is equal to the kk-th term of the level-(i+1)(i+1) sequence. Similarly, by applying the same argument in the reverse order k=i,i1,,j+1k = i, i-1, \dots, j+1, we can show that for any integer kk with j+1kij+1 \le k \le i, the kk-th term of the level-ii sequence is equal to the (k+1)(k+1)-th term of the level-(i+1)(i+1) sequence, thus the lemma is proved. ■

Lemma 3. For each integer 25i4325 \le i \le 43, the level-(i+1)(i+1) sequence is equal to the sequence obtained from the level-ii sequence by deleting exactly one term while preserving the order.
Proof. The proof is similar to that of Lemma 2. ■

(i) The level sequences of height 20, 21, ..., 25 are all identical and are permutations of 1, 2, ..., 20.
(ii) For every integer 1i191 \le i \le 19, the level-ii sequence is obtained from the level-(i+1)(i+1) sequence by deleting exactly one term while preserving the order.
(iii) For every integer 25i4325 \le i \le 43, the level-(i+1)(i+1) sequence is obtained from the level-ii sequence by deleting exactly one term while preserving the order.

Conversely, we will show that any numbering that satisfies the conditions (i), (ii), and (iii) can be realized as the final result of the game. Let XX be a numbering that satisfies (i), (ii), and (iii). Fix an integer nn with 1n201 \le n \le 20, and let mm be the minimum and MM the maximum of the heights in which the number nn appears in XX. From (i), we have m20m \le 20 and M25M \ge 25. From (ii) and (iii), it follows that for any miMm \le i \le M, the level-ii sequence also contains the number nn exactly once. Suppose that nn appears in the lil_i-th term of the level-ii sequence. Then, by conditions (i), (ii), and (iii), for any mi<Mm \le i < M, the li+1l_{i+1}-th cell in the level-(i+1)(i+1) sequence is either to the right or above the lil_i-th cell of the level-ii sequence. Therefore, in the nn-th turn, Alice can choose k=Mm+1k = M - m + 1, and AiA_i as the lm+i1l_{m+i-1}-th cell in the level-(m+i1)(m + i - 1) sequence for each i=1,2,,ki = 1, 2, \dots, k, and in this case, the final numbering coincides with XX.

Hence, it is sufficient to count the numberings satisfying (i), (ii), and (iii). First, there are 20!20! ways to fill the cells of heights 20, 21, ..., 25 satisfying (i). Fix one such filling. Then, the number of ways to fill the cells of heights 1, 2, ..., 19 satisfying (ii) is equal to the number of ways to successively remove one integer at a time from the set {1,2,...,20}\{1, 2, ..., 20\}, which is 20!20!. Similarly, the number of ways to fill the cells of heights 26, 27, ..., 44 satisfying (iii) is also 20!20!. Therefore, the total number of possible final numberings is 20!20!20!=20!320! \cdot 20! \cdot 20! = 20!^3.

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 and solution reproduced as published; topic and difficulty added by this site.