Maths Olympiad Prep

Library / /91 of 92

Combinatorics Difficulty 7.8 National olympiad, round 2 Prove it Iran

Let mm, nn and a1,a2,,ama_1, a_2, \dots, a_m be arbitrary positive integers. Ali and Mohammad play the following game: At each step, Ali chooses b1,b2,,bmNb_1, b_2, \dots, b_m \in \mathbb{N}, then Mohammad chooses a positive integer ss and obtains a new sequence {ci=ai+bi+s}i=1m\{c_i = a_i + b_{i+s}\}_{i=1}^m, where
bm+1=b1, bm+2=b2, , bm+s=bs. b_{m+1} = b_1,\ b_{m+2} = b_2,\ \dots,\ b_{m+s} = b_s.
Through a finite number of steps, Ali intends to make all the numbers divisible by nn. Find all positive integers mm and nn such that Ali, independent of the initial values a1,a2,,ama_1, a_2, \dots, a_m, has a winning strategy.

Solution

We claim that the second player has a winning strategy for (m,n)=(pα,pβ)(m, n) = (p^{\alpha}, p^{\beta}) where pp is a prime number and α,βZ0\alpha, \beta \in \mathbb{Z}^{\ge 0}. We call a pair (m,n)(m, n) a good pair if the second player has a winning strategy.

Lemma 1. If (m,n)(m, n) is a good pair and dmd \mid m then (d,n)(d, n) is also a good pair.

*Proof.* Assume that the game starts with the sequence a1,a2,...,ada_1, a_2, ..., a_d. Mohammad considers a second game that starts with the sequence (a~1,a~2,...,a~m)(\tilde{a}_1, \tilde{a}_2, ..., \tilde{a}_m) where a~mid=ai\tilde{a}_{\frac{mi}{d}} = a_i and a~j=0\tilde{a}_j = 0, for mdj\frac{m}{d} \nmid j. Now if Ali chooses ss in the first game, Mohammad assumes that Ali chooses mds\frac{m}{d}s in the second game and follows his strategy and wins the second game. But the first game is just a restriction of the second game to the components mdi\frac{m}{d}i so he can also win the first game.

Lemma 2. (m,nk)(m, nk) is a good pair if and only if (m,n)(m, n) and (m,k)(m, k) are also good pairs.

*Proof.* If (m,nk)(m, nk) is a good pair then it is clear that (m,n)(m, n) and (m,k)(m, k) are good pairs. Now if (m,n)(m, n) and (m,k)(m, k) are good pairs, starting with a sequence a1,...,ama_1, ..., a_m then using the aforementioned strategy for (m,n)(m, n), making all the components divisible by nn. Considering the sequence (ain)(\frac{a_i}{n}), applying the preceding strategy for (m,k)(m, k) to ensure that kaink \mid \frac{a_i}{n}, by the very end all the terms are divisible by nknk and hence nknk is a good pair.

By these lemmas we see that if (m,n)(m, n) is a good pair and pmp \mid m, qnq \mid n then (p,q)(p, q) is also a good pair. Now by the next lemma we would obtain p=qp = q. Hence (m,n)(m, n) should be of the form (pα,pβ)(p^{\alpha}, p^{\beta}).

Lemma 3. If (m,n)(m, n) is a good pair and m,n>1m, n > 1 then gcd(m,n)>1\gcd(m, n) > 1.

*Proof.* Assume that gcd(m,n)=1\gcd(m, n) = 1. Consider one step before the end of the game. The sequence (ai)(a_i) must be constant; otherwise for each sequence (bi)(b_i) there is some jj such that ai+bj≢0(modn)a_i + b_j \not\equiv 0 \pmod{n} and the first player can choose jij - i. In the second step before the last step, we should have
a0ama1a0=a2a1amam1(modn), a_0 - a_m \equiv a_1 - a_0 = a_2 - a_1 \equiv \dots \equiv a_m - a_{m-1} \pmod{n},
otherwise Ali could choose a shift ss such that (ai+bi+s)(a_i + b_{i+s}) is not constant. So we must have m(a1a0)0(modn)m(a_1 - a_0) \equiv 0 \pmod{n}, implying that a1a00(modn)a_1 - a_0 \equiv 0 \pmod{n}. So the sequence is constant. We then use induction to deduce that the sequence should be constant from the starting point. So, for a non-constant sequence the first player has a winning strategy.

It remains to prove that (pα,pβ)(p^{\alpha}, p^{\beta}) is a good pair. By the second lemma it suffices to prove that (pα,p)(p^{\alpha}, p) is a good pair. We claim that if the second player chooses bi=aib_i = -a_i at each step, he shall win. There are two ways to do this:

First proof. Let T:(Z/pZ)m(Z/pZ)mT : (\mathbb{Z}/p\mathbb{Z})^m \to (\mathbb{Z}/p\mathbb{Z})^m denote a shift by 1. Then at each step the sequence changes to (Tsid)(a1,,apα)(T^s - \text{id})(a_1, \dots, a_{p^\alpha}). It suffices to prove that
j=1pα(Tsjid)0(modp) \prod_{j=1}^{p^{\alpha}} (T^{s_j} - \text{id}) \equiv 0 \pmod{p}
but TidTsjidT - \text{id} \mid T^{s_j} - \text{id}. So it is enough to prove (Tid)pα0(modp)(T - \text{id})^{p^\alpha} \equiv 0 \pmod{p} but
(Tid)pαTpαid0(modp). (T - \text{id})^{p^{\alpha}} \equiv T^{p^{\alpha}} - \text{id} \equiv 0 \pmod{p}.

Second proof.

Lemma 4. *There is an integer-valued polynomial Q(x)Q(x) such that Q(i)ai(modp)Q(i) \equiv a_i \pmod{p} for all 1ipα1 \le i \le p^\alpha.*

*Proof.* Consider the polynomial Pi(x)=(xi1pα1)P_i(x) = \binom{x-i-1}{p^\alpha-1}. One can see that Pi(i)1(modp)P_i(i) \equiv 1 \pmod{p} and for ji(modpα)j \ne i \pmod{p^\alpha}, we have Pi(j)0(modp)P_i(j) \equiv 0 \pmod{p}. Then we can choose
Q(x)=i=1pαaiPi(x). Q(x) = \sum_{i=1}^{p^{\alpha}} a_i P_i(x).
Now, in the next step we have aiQ(i)Q(i+s)(modp)a_i \equiv Q(i) - Q(i+s) \pmod{p} but the degree of Q(x)Q(x+s)Q(x) - Q(x+s) is less than deg(Q)\deg(Q) so after pαp^\alpha steps the second player wins.

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.