Olympiad Maths Prep

Track / Stage 4 / 48 of 340 #308 of 2000

Problem 308

AMC 12 late, AIME early
Combinatorics Difficulty 4.7 Find the answer HMMT November 2024 · United States · 2024

Problem:
A grid is called groovy if each cell of the grid is labeled with the smallest positive integer that does not appear below it in the same column or to the left of it in the same row. Compute the sum of the entries of a groovy 14×1414 \times 14 grid whose bottom left entry is 11.

Official solution

Solution:
The following diagram is the entire 16×1616 \times 16 groovy grid computed out. However, one will not need to write out every single entry to obtain the answer.

| 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| 15 | 16 | 13 | 14 | 11 | 12 | 9 | 10 | 7 | 8 | 5 | 6 | 3 | 4 | 1 | 2 |
| 14 | 13 | 16 | 15 | 10 | 9 | 12 | 11 | 6 | 5 | 8 | 7 | 2 | 1 | 4 | 3 |
| 13 | 14 | 15 | 16 | 9 | 10 | 11 | 12 | 5 | 6 | 7 | 8 | 1 | 2 | 3 | 4 |
| 12 | 11 | 10 | 9 | 16 | 15 | 14 | 13 | 4 | 3 | 2 | 1 | 8 | 7 | 6 | 5 |
| 11 | 12 | 9 | 10 | 15 | 16 | 13 | 14 | 3 | 4 | 1 | 2 | 7 | 8 | 5 | 6 |
| 10 | 9 | 12 | 11 | 14 | 13 | 16 | 15 | 2 | 1 | 4 | 3 | 6 | 5 | 8 | 7 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 |
| 7 | 8 | 5 | 6 | 3 | 4 | 1 | 2 | 15 | 16 | 13 | 14 | 11 | 12 | 9 | 10 |
| 6 | 5 | 8 | 7 | 2 | 1 | 4 | 3 | 14 | 13 | 16 | 15 | 10 | 9 | 12 | 11 |
| 5 | 6 | 7 | 8 | 1 | 2 | 3 | 4 | 13 | 14 | 15 | 16 | 9 | 10 | 11 | 12 |
| 4 | 3 | 2 | 1 | 8 | 7 | 6 | 5 | 12 | 11 | 10 | 9 | 16 | 15 | 14 | 13 |
| 3 | 4 | 1 | 2 | 7 | 8 | 5 | 6 | 11 | 12 | 9 | 10 | 15 | 16 | 13 | 14 |
| 2 | 1 | 4 | 3 | 6 | 5 | 8 | 7 | 10 | 9 | 12 | 11 | 14 | 13 | 16 | 15 |
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |

We prove the following key claim.

Claim 1. In the 2n×2n2^{n} \times 2^{n} groovy grid, each row and column is a permutation of the numbers from 11 to 2n2^{n}.

Proof. We use induction on nn. The base case n=0n=0 is clear. Now, assume that we know this for a 2n×2n2^{n} \times 2^{n} groovy grid, and we will prove it for a 2n+1×2n+12^{n+1} \times 2^{n+1} grid. To that end, we divide the 2n+1×2n+12^{n+1} \times 2^{n+1} grid into four subgrids of size 2n×2n2^{n} \times 2^{n}.

Figure 1

The subgrid labeled AA is the groovy grid of size 2n×2n2^{n} \times 2^{n}, so by induction, each row and column is a permutation of {1,,2n}\{1, \ldots, 2^{n}\}. Thus, the bottom left corner of the subgrid labeled BB is 2n+12^{n}+1, and so the subgrid labeled BB is the groovy grid where each entry is added by 2n2^{n}. Hence, by induction hypothesis, each row and column of the subgrid labeled BB is a permutation of {2n+1,2n+2,,2n+2n}\{2^{n}+1,2^{n}+2, \ldots, 2^{n}+2^{n}\}. The same argument applies for the subgrid labeled CC.

Finally, the subgrid labeled DD has enough numbers from 1,2,,2n1,2, \ldots, 2^{n} and does not need any number greater than 2n2^{n}. The bottom left corner is 11. Hence, it must be a groovy grid. Thus, the induction hypothesis applies, and each row and column of the subgrid labeled DD is a permutation of {1,2,,2n}\{1,2, \ldots, 2^{n}\}. By considering all subgrids together, we find that each row and column of the entire grid is a permutation of {1,2,,2n+1}\{1,2, \ldots, 2^{n+1}\}.

In particular, we have that every row and column of the 16×1616 \times 16 grid is a permutation of {1,2,,16}\{1,2, \ldots, 16\}. To compute the sum of entries of the 14×1414 \times 14 grid, we can take out 22 rows and 22 columns and add back the top right 2×22 \times 2 which we know entries 1,2,2,11,2,2,1 by following the proof of the claim. This gives the final answer of
1616172216172216172+(1+2+2+1)=1638. 16 \cdot \frac{16 \cdot 17}{2}-2 \cdot \frac{16 \cdot 17}{2}-2 \cdot \frac{16 \cdot 17}{2}+(1+2+2+1)=1638.

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