Maths Olympiad Prep

Library / /20 of 24

, 2016

Combinatorics Difficulty 7.5 National olympiad, round 2 Prove it Argentina

Alex and Bibi play the following game. Alex chooses a natural number kk not exceeding 10001000. Then Bibi chooses a collection BB of nn integers in {0,1,...,1000}\{0,1,...,1000\}, not necessarily distinct, where n>kn > k. Now Alex is allowed to apply repeatedly the following operation on BB: choosing kk numbers b1,...,bkb_1, ..., b_k from BB and changing them as follows. For each i=1,...,ki = 1, ..., k the number bib_i is replaced by bi+1b_i + 1 if bi<1000b_i < 1000 and by 00 if bi=1000b_i = 1000.

Alex wins if via several operations he succeeds in making all numbers in BB equal to 00; if he fails then Bibi wins. Find all kk that guarantee Alex a win, regardless of the collection BB chosen by Bibi.

Solution

The winning values of kk are the numbers in {1,...,1000}\{1, ..., 1000\} that are coprime with 10011001, i.e., not divisible by 77, 1111 or 1313.

Despite the repetitions in Bibi's collection BB for brevity we call it a set in the solution and denote the number of its elements by B|B|. The allowed operation is choosing a kk-element subset of BB and increasing each of its elements by 11 modulo 10011001.

Let us show that a winning number kk is coprime with 10011001. Assume on the contrary that gcd(k,1001)=d>1\text{gcd}(k,1001) = d > 1 and consider any set BB chosen by Bibi. Let the elements of BB have sum SS. Suppose Alex chooses kk numbers from BB of which mm are 10001000. Then the operation increases SS by (km)1000m=k1001m(k - m) - 1000m = k - 1001m, a number divisible by dd in view of gcd(k,1001)=d\text{gcd}(k,1001) = d. Hence the operation does not change SS modulo dd, for any choice of BB. Let BB contain one number 11 and B1|B|-1 zeros. Then S1(modd)S \equiv 1 \pmod{d} persists after each operation, while the desired "all zeros" final state requires S0(modd)S \equiv 0 \pmod{d}. The contradiction proves that gcd(k,1001)=1\text{gcd}(k,1001) = 1 is a necessary condition for kk to be winning.

Conversely, gcd(k,1001)=1\text{gcd}(k, 1001) = 1 is sufficient. For a proof consider the unique integer ll in {1,...,1000}\{1, ..., 1000\} such that kl1(mod1001)kl \equiv 1 \pmod{1001}. Let BB any set chosen by Bibi and bBb \in B an arbitrary element. It is enough to show that there is a sequence of operations that adds 11 modulo 10011001 to bb without affecting the remaining numbers in BB.

Take a (k+1)(k + 1)-element subset CC of BB that contains bb. This is possible as B>k|B| > k. Apply the operation ll times to each kk-element subset of CC. Each element of CC is contained in exactly kk such subsets, so the procedure increases it klkl times modulo 10011001. Because kl1(mod1001)kl \equiv 1 \pmod{1001}, the result is that each element of CC is increased by 11 modulo 10011001. Now take the kk-element subset C{b}C \setminus \{b\} of CC and apply the operation 10001000 times. After all described operations each element of C{b}C \setminus \{b\} is increased by 1+1000=10011+1000=1001 modulo 10011001 with respect to its initial state, meaning that the operations do not change it. Clearly the elements of BCB \setminus C do not change either. The only change concerns bb which is increased by 11 modulo 10011001, as needed. Hence gcd(k,1001)=1\text{gcd}(k, 1001) = 1 is a sufficient condition, and the solution is complete.

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.