Olympiad Maths Prep

Track / Stage 9 / 37 of 80 #1917 of 2000

Problem 1917

IMO P2/P5; hard shortlist
Number theory Difficulty 9.1 Prove it Baltic Way 2023 Shortlist · Baltic Way · 2023

Let nn be a positive integer. In this problem, we consider labellings of the squares of a chessboard of size n×nn \times n with the natural numbers from 11 to n2n^2 such that every number is used exactly once. Given such a labelling, we say a positive integer is a *rook product* if it is the product of the labels of nn squares which have the property that if you place a rook on each of them, no two rooks will attack each other.
(Two rooks are attacking each other, if and only if they are in the same row or column.)

a. Let n=8n = 8. Determine whether there exists a labelling of an 8×88 \times 8 chessboard such that the following condition is fulfilled: The difference of any two rook products is always divisible by 6565.

b. Let n=10n = 10. Determine whether there exists a labelling of a 10×1010 \times 10 chessboard such that the following condition is fulfilled: The difference of any two rook products is always divisible by 101101.

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

a. No, there is no such labelling.
On the contrary, we show that for every labelling there exist two rook products whose difference is not divisible by 6565. Suppose that an 8×88 \times 8 chessboard is labelled with the numbers 1,2,,641, 2, \ldots, 64 such that no number is used twice.
We can construct a rook product that is divisible by 1313 by placing a rook on the square with the label 1313 and the other seven rooks non attackingly, but otherwise arbitrarily.
We can construct a rook product that is not divisible by 1313 as follows. Notice that only four labels are divisible by 1313, namely 13,26,3913, 26, 39, and 5252. These four labels are located in at most four rows; we denote the index set of these rows R{1,8}R \subseteq \{1, 8\}. Similarly, there are at least four columns that do not contain any of these four labels; we denote the index set of these columns C{1,8}C \subseteq \{1, 8\}. Since RC|R| \leq |C| it is possible to place non attacking rooks in rows RR using only columns from CC. The remaining rooks are placed in the remaining rows non attackingly, but otherwise arbitrarily. The resulting rook product is not divisible by 1313 since the rooks avoid the squares whose labels are divisible by 1313.

The difference of the two rook products is not divisible by 1313, since one rook product is divisible by 1313 whereas the other one is not. Hence the difference is not divisible by 6565.

b. Yes, there is such a labelling.
For k[0,99]k \in [0, 99] we define ak=2k(mod101)a_k = 2^k \pmod{101}; in other words, aka_k is the remainder of 2k2^k when divided by 101101. Note that ak0a_k \neq 0 since no power of 22 is divisible by 101101. Hence 1ak1001 \leq a_k \leq 100 for all k[0,99]k \in [0, 99].

Since r<sr < s and ss is the smallest positive integer with 2s1(mod101)2^s \equiv 1 \pmod{101}, we must have r=0r = 0. In other words, 100100 is divisible by ss; in other words, ss is a divisor of 100100.
We claim that s=100s = 100. If this was not the case, we would have s20s|20 or s50s|50, which implies that 2201(mod101)2^{20} \equiv 1 \pmod{101} or 2501(mod101)2^{50} \equiv 1 \pmod{101}. However 210=102414(mod101)2^{10} = 1024 \equiv 14 \pmod{101}, so that 2201421966≢1(mod101)2^{20} \equiv 14^2 \equiv 196 \equiv -6 \not\equiv 1 \pmod{101} and 250(220)2210(6)2145041≢1(mod101)2^{50} \equiv (2^{20})^2 \cdot 2^{10} \equiv (-6)^2 \cdot 14 \equiv 504 \equiv -1 \not\equiv 1 \pmod{101}.
Now assume that k,l[0,99]k, l \in [0, 99] are positive integers with k>lk > l and ak=ala_k = a_l. Then we have 2k2l(mod101)2^k \equiv 2^l \pmod{101}. We conclude that 02k2l2l(2kl1)(mod101)0 \equiv 2^k - 2^l \equiv 2^l \cdot (2^{k-l} - 1) \pmod{101}. Since 2l2^l and 101101 are coprime, it follows that 2kl10(mod101)2^{k-l} - 1 \equiv 0 \pmod{101} and 2kl1(mod101)2^{k-l} \equiv 1 \pmod{101}. This cannot be true, since kl[1,99]k-l \in [1, 99], but s=100s = 100 is the smallest positive integer with 2s1(mod101)2^s \equiv 1 \pmod{101}. Hence akala_k \neq a_l.
We conclude that the numbers aka_k with k[0,99]k \in [0, 99] are a hundred pairwise different numbers from the set [1,100][1, 100], hence they are a permutation of the set [1,100][1, 100] as it was required.

Solution 2

Definition: Let pp be a prime. Consider an n×nn \times n-square of elements ai,jFpa_{i,j} \in \mathbb{F}_p^* (for i,j=1,,ni,j = 1, \dots, n), which are not necessarily distinct. We call it *rooky*, if all its rook-products are equal as elements in Fp\mathbb{F}_p^*.
We will provide a classification of all *rooky* squares. Of course, most of this is not necessary when writing down a solution to the given problem, but it may still be interesting...

Lemma: A square is *rooky* if and only if for all ii, jj, kk, \ell:
ai,jak,=ai,ak,j(1) a_{i,j} \cdot a_{k,\ell} = a_{i,\ell} \cdot a_{k,j} \quad (1)
*Proof.* If we swap the rows of two rooks and keep their columns, it turns one valid rook formation into another. When comparing their rook products, we can ignore all n2n - 2 values of rooks that were not moved. The remaining values are ai,jak,a_{i,j} \cdot a_{k,\ell} resp. ai,ak,ja_{i,\ell} \cdot a_{k,j} for certain ii, jj, kk, \ell. This gives equality (1) for *rooky* squares.
Conversely assume that (1) holds. Then we have to compare two arbitrary rook products. But they can be transformed into each other by a sequence of several swaps of two rooks. Due to (1) the rook product does not change at any of these steps, so the rook products of the original configurations are the same as well. \Box

Lemma: A *rooky* square is uniquely determined by the elements of its first row and first column.
*Proof.* Indeed the previous lemma implies that
ai,ja1,1=ai,1a1,j a_{i,j} \cdot a_{1,1} = a_{i,1} \cdot a_{1,j}
which determines ai,ja_{i,j} uniquely because a1,1a_{1,1} is a unit. \Box

One can actually prove directly that the square obtained that way is *rooky*, but it is simpler to continue directly to

Proposition: Let λiFp\lambda_i \in \mathbb{F}_p^* (i=1,,ni = 1, \dots, n) and μjFp\mu_j \in \mathbb{F}_p^* (j=1,,nj = 1, \dots, n) be arbitrary elements. Then the square with
ai,j=λiμj a_{i,j} = \lambda_i \cdot \mu_j
is *rooky*. Moreover any *rooky* square can be obtained this way.

Let us prove the converse: By the previous lemma, it suffices to find λi\lambda_is and μj\mu_js that recreate the values of the first row and column. For this simply set λi=ai,1\lambda_i = a_{i,1} and μj=a1,ja1,1\mu_j = \frac{a_{1,j}}{a_{1,1}}. \Box

Proposition: For any prime p>n2p > n^2, there exists a *rooky* square with only distinct elements.
*Proof.* Choose any primitive root αFp\alpha \in \mathbb{F}_p^*. Then set λi=αi1\lambda_i = \alpha^{i-1}, μj=αn(j1)\mu_j = \alpha^{n \cdot (j-1)} and ai,j=λiμj=αi1+n(j1)a_{i,j} = \lambda_i \cdot \mu_j = \alpha^{i-1+n \cdot (j-1)}. This provides indeed a *rooky* square. The values in the square are α0,α1,,αn21\alpha^0, \alpha^1, \dots, \alpha^{n^2-1}. As we have chosen a primitive root, these are all distinct. \Box

For n=10n = 10, p=101p = 101 and α=2\alpha = 2, this reproduces exactly the construction given in the previous solution.

*Proof.* The square with ai,j=λiμja_{i,j} = \lambda_i \cdot \mu_j is *rooky*, because any rook product has the value
iλijμj. \prod_i \lambda_i \cdot \prod_j \mu_j.

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