Maths Olympiad Prep

Library /

Combinatorics Difficulty 8.8 Shortlist Prove it Switzerland

Problem:

Let (a,b)(a, b) be a pair of positive integers. Henning and Paul are playing a game: Initially, there are two piles of aa and bb stones, respectively, on a table. The pair (a,b)(a, b) is called the initial configuration of the game. The players proceed as follows:
- The players alternate and Henning begins.
- In each turn, a player either removes a positive number of stones from one of the two piles or the same positive number of stones from both piles.
- The player who removes the last stone from the table wins the game.
Let AA be the set of all positive integers aa for which there exists a positive integer b<ab<a such that Paul has a winning strategy for the initial configuration (a,b)(a, b). Order the elements of AA increasingly as a1<a2<a_{1}<a_{2}<\ldots

a. Prove that the set AA is infinite.
b. Prove that the sequence (mk)k1\left(m_{k}\right)_{k \geq 1} defined by mk:=ak+1akm_{k}:=a_{k+1}-a_{k} for all k1k \geq 1 is not eventually periodic.

Remark: A sequence (xk)k1\left(x_{k}\right)_{k \geq 1} is eventually periodic if there exists an integer k00k_{0} \geq 0 such that the sequence (xk+k0)k1\left(x_{k+k_{0}}\right)_{k \geq 1} is periodic.

Solutions — 2

Solution 1

Solution:

(a)
We call a general pair of starting values (a,b)(a, b) good if Paul has a winning strategy for it. For completeness, we also allow a=0a=0 or b=0b=0 and call (0,0)(0,0) good. Analogously, we call all pairs that are not good bad and note that for these starting values, Henning obviously has a winning strategy. We use the following general principle:
If (a,b)(a, b) is good, then (a+n,b)(a+n, b), (a,b+n)(a, b+n), (a+n,b+n)(a+n, b+n) are bad for every nNn \in \mathbb{N}, since Henning can simply reach (a,b)(a, b) in his first move, and then Paul must start a new game with starting values that are now good for Henning. Thus, for each aa there is at most one bb such that (a,b)(a, b) is good.
Furthermore: If Henning can only reach bad positions in his first move from (a,b)(a, b), then (a,b)(a, b) is good, because Paul then has a winning strategy regardless of Henning's move, by the above remark.
Now suppose that AA has only finitely many elements. Then there are also only finitely many good starting values (since for each good position, by the above principle and because (a,b)(a, b) good (b,a)\Longleftrightarrow (b, a) good, there is exactly one element from AA, namely the smaller of the two starting values). In particular, there is a number CC strictly greater than all a,ba, b with (a,b)(a, b) good. However, for (C,2C)(C, 2C), the pairs (Cn,2C)(C-n, 2C), (Cn,2Cn)(C-n, 2C-n) for each n{1,2,,C}n \in \{1,2, \ldots, C\} and (C,2Cm)(C, 2C-m) for each m{1,2,,2C}m \in \{1,2, \ldots, 2C\} are bad by the construction of CC, so (C,2C)(C, 2C) is good. Contradiction!

(b)
We first show that every natural number occurs either in AA or in B={bk(ak,bk) good}B = \{b_{k} \mid (a_{k}, b_{k}) \text{ good}\}. What we found in part (a) implies that a natural number cannot occur in both sets. Suppose there is an nNn \in \mathbb{N} such that nn occurs in neither AA nor BB, and choose nn minimal. In other words, for all mNm \in \mathbb{N}, the pair (m,n)(m, n) is bad. But this also means that for each mm, one of the pairs (m,n1),(m,n2),,(m,0),(m1,n1),(m2,n2),,(mmin{m,n},nmin{m,n})(m, n-1), (m, n-2), \ldots, (m, 0), (m-1, n-1), (m-2, n-2), \ldots, (m-\min\{m, n\}, n-\min\{m, n\}) is good. For example, consider m=n+1,2n+1,3n+1,,(n+1)n+1m = n+1, 2n+1, 3n+1, \ldots, (n+1)n+1; all these tuples are pairwise distinct.
Thus, by our assumption, we obtain n+1n+1 different good pairs, all of the form (x,y)(x, y) with y{0,1,,n1}y \in \{0,1, \ldots, n-1\}. However, by the pigeonhole principle, two yy must take the same value, which contradicts our intermediate result from (a). Thus, AB=NA \sqcup B = \mathbb{N}.

The next step is to show that akbk=ka_{k} - b_{k} = k holds for all kNk \in \mathbb{N} and that bk=min(N{a1,,ak1,b1,,bk1})b_{k} = \min \left(\mathbb{N} \setminus \{a_{1}, \ldots, a_{k-1}, b_{1}, \ldots, b_{k-1}\}\right). This is easily found by trial and can be proved by induction.
- Base case: Obviously, a0=0,b0=0a_{0} = 0, b_{0} = 0 and a1=2,b1=1a_{1} = 2, b_{1} = 1 are the first good pairs and satisfy the statement.
- Assume that the numbers a1,,ana_{1}, \ldots, a_{n} and b1,,bnb_{1}, \ldots, b_{n} satisfy the statement. Now set bn+1=min(N{a1,,an,b1,,bn})b_{n+1} = \min \left(\mathbb{N} \setminus \{a_{1}, \ldots, a_{n}, b_{1}, \ldots, b_{n}\}\right). Since by the induction hypothesis bk<bn+1b_{k} < b_{n+1} for all knk \leq n, it follows that bn+1+n+1>bk+k=akb_{n+1} + n + 1 > b_{k} + k = a_{k} for all knk \leq n. In particular, we can set an+1=bn+1+n+1a_{n+1} = b_{n+1} + n + 1, since this is not yet in the set {a1,,an,b1,,bn}\{a_{1}, \ldots, a_{n}, b_{1}, \ldots, b_{n}\}. It remains to show that the pair (an+1,bn+1)(a_{n+1}, b_{n+1}) is indeed good. For this, we distinguish the following possibilities for Henning's first move with starting values (an+1,bn+1)(a_{n+1}, b_{n+1}):
If Henning only reduces the pile with bn+1b_{n+1} coins, he reaches a number of coins that is already in the set {a0,a1,,an,b0,b1,,bn}\{a_{0}, a_{1}, \ldots, a_{n}, b_{0}, b_{1}, \ldots, b_{n}\}. In any case, Paul can now, by reducing the pile with an+1a_{n+1} coins, reach a good pair, since an+1>akbka_{n+1} > a_{k} \geq b_{k} for all kN{0}k \in \mathbb{N} \cup \{0\}.
If Henning reduces both piles, the pile with originally bn+1b_{n+1} coins is reduced to a number in {a0,a1,,an,b0,b1,,bn}\{a_{0}, a_{1}, \ldots, a_{n}, b_{0}, b_{1}, \ldots, b_{n}\}. If it is an aka_{k}, Paul can of course reduce the other pile to bkb_{k} coins because an+1x>bn+1x=akbka_{n+1} - x > b_{n+1} - x = a_{k} \geq b_{k}. If it is a bkb_{k}, Paul can reduce the other pile to aka_{k} coins because ak=bk+k<bk+n+1=(bn+1x)+n+1=an+1xa_{k} = b_{k} + k < b_{k} + n + 1 = (b_{n+1} - x) + n + 1 = a_{n+1} - x.
If Henning only reduces the pile with an+1a_{n+1} coins to xx coins, there are again several possibilities:
If xbn+1x \geq b_{n+1}, Henning has reduced the difference between the two piles. Since bn+1>bkb_{n+1} > b_{k} for all k{0,1,,n}k \in \{0,1, \ldots, n\}, Paul can reach the pair with this new difference by removing a suitable number of coins from both piles.
If x<bn+1x < b_{n+1}, then either x=akx = a_{k} or x=bkx = b_{k} for some knk \leq n. If x=akx = a_{k}, then bkak<bn+1b_{k} \leq a_{k} < b_{n+1}, so Paul can reach the good pair (ak,bk)(a_{k}, b_{k}) by reducing the pile with bn+1b_{n+1} coins. If x=bkx = b_{k}, then we distinguish two cases: Either ak=bk+k<bn+1a_{k} = b_{k} + k < b_{n+1}; in this case, Paul reduces the pile with bn+1b_{n+1} coins to reach the good pair (ak,bk)(a_{k}, b_{k}), or ak=bk+k>bn+1a_{k} = b_{k} + k > b_{n+1} (note that ak=bn+1a_{k} = b_{n+1} cannot occur by the construction of bn+1b_{n+1}). In this case, bn+1x<akx=akbk=kb_{n+1} - x < a_{k} - x = a_{k} - b_{k} = k. So the difference between xx and bn+1b_{n+1} is less than kk, and Paul can reach the good pair with this difference by removing a suitable number of coins.
These are all possible cases. Thus, we have shown that (an+1,bn+1)(a_{n+1}, b_{n+1}) is also good.

Now we use all these insights to show that the sequence (mk)k1(m_{k})_{k \geq 1} can never become periodic:
Suppose the sequence (mk)kK(m_{k})_{k \geq K} is periodic with period c1c \geq 1. We define d=aK+caKd = a_{K+c} - a_{K} and note (inductively) that ak+nc=ak+nda_{k+nc} = a_{k} + n d holds for all kKk \geq K and nNn \in \mathbb{N}. Furthermore, d>cd > c, because otherwise, due to periodicity, every natural number greater than KK would be contained in AA, and thus the set BB would be finite, which is obviously absurd. So there is an nNn \in \mathbb{N} such that n(dc)Kn(d-c) \geq K. For this nn, however, we have:
bnd=andnd=an(dc) b_{n d} = a_{n d} - n d = a_{n(d-c)}
This contradicts AA and BB being disjoint! Thus, we are done.

Solution 2

Solution:

As in the first solution, we show that A(0):={aN00ba:(a,b) good}={a0,a1,}A^{(0)} := \{a \in \mathbb{N}_{0} \mid \exists 0 \leq b \leq a : (a, b) \text{ good}\} = \{a_{0}, a_{1}, \ldots\} (with a0<a1<a_{0} < a_{1} < \ldots) is infinite. Furthermore, we note that if (a,b)(a, b) and (a,b)(a', b') are good and additionally a=aa = a' or b=bb = b' or ab=aba-b = a'-b', then (a,b)=(a,b)(a, b) = (a', b'). This leads to the fact that for each akA(0)a_{k} \in A^{(0)} there is exactly one bkN0b_{k} \in \mathbb{N}_{0} such that (ak,bk)(a_{k}, b_{k}) is good; by definition of A(0)A^{(0)}, akbka_{k} \geq b_{k}. Furthermore, if we set B(0):={b0,b1,}B^{(0)} := \{b_{0}, b_{1}, \ldots\}, then A(0)B(0)={0}A^{(0)} \cap B^{(0)} = \{0\}, since if ak=bla_{k} = b_{l} with k,l>0k, l > 0, the pairs (al,ak)(a_{l}, a_{k}) and (bk,ak)(b_{k}, a_{k}) are good, but also bk<ak=bl<alb_{k} < a_{k} = b_{l} < a_{l}, contradiction. Now we show by strong induction that for all k1k \geq 1 the following holds:
(i) {0,1,,bk}{a0,,ak}{b0,,bk}\{0,1, \ldots, b_{k}\} \subset \{a_{0}, \ldots, a_{k}\} \cup \{b_{0}, \ldots, b_{k}\}
(ii) akbk=ka_{k} - b_{k} = k
(iii)
(ak,bk)={(ak1,bk1)+(2,1)if bk1+1{a0,,ak1}(ak1,bk1)+(3,2)otherwise (a_{k}, b_{k}) = \begin{cases} (a_{k-1}, b_{k-1}) + (2,1) & \text{if } b_{k-1} + 1 \notin \{a_{0}, \ldots, a_{k-1}\} \\ (a_{k-1}, b_{k-1}) + (3,2) & \text{otherwise} \end{cases}
The statement holds for k=1k=1 and k=2k=2, so assume it holds for all iki \leq k with k2k \geq 2. Suppose there is a good pair (ak+1,b)(a_{k}+1, b), then by (i) of the induction hypothesis b>bkb > b_{k}, since all values up to bkb_{k} already appear in a good pair with a smaller other pile. But then ak+1nka_{k}+1-n \leq k, which is a contradiction, since this difference is already occupied by a smaller good pair, by (ii) of the induction hypothesis. Now we distinguish cases.

Case 1: bk+1{a0,,ak}b_{k}+1 \notin \{a_{0}, \ldots, a_{k}\}
We show that (ak+2,bk+1)(a_{k}+2, b_{k}+1) is good, and thus (ak+1,bk+1)=(ak,bk)+(2,1)(a_{k+1}, b_{k+1}) = (a_{k}, b_{k}) + (2,1). Indeed, all (ak+2,bk+1m)(a_{k}+2, b_{k}+1-m) are bad, since by (i) bk+1mb_{k}+1-m already appears in a good pair with a smaller other pile, (ak+2m,bk+1m)(a_{k}+2-m, b_{k}+1-m) is bad since m=1m=1 is not possible by the above argument, and if for m2m \geq 2 the pair (ak+2m,bk+1m)(a_{k}+2-m, b_{k}+1-m) were good, we would necessarily have (ak+2m,bk+1m)=(al,bl)(a_{k}+2-m, b_{k}+1-m) = (a_{l}, b_{l}) for some lkl \leq k, which is not possible since k+1=(ak+2m)(bk+1m)=albl=lk+1 = (a_{k}+2-m)-(b_{k}+1-m) = a_{l}-b_{l} = l. Finally, (ak+2m,bk+1)(a_{k}+2-m, b_{k}+1) is also bad, since again m=1m=1 is not possible, and if (ak+2m,bk+1)(a_{k}+2-m, b_{k}+1) is good for m2m \geq 2, then bk+1b_{k}+1 cannot be the smaller pile since it could then have at most bkb_{k} stones. But since bk+1bk+k=akb_{k}+1 \leq b_{k}+k = a_{k}, it follows that bk+1{a0,,ak}b_{k}+1 \in \{a_{0}, \ldots, a_{k}\}, which contradicts our assumption.

Case 2: bk+1{a0,,ak}b_{k}+1 \in \{a_{0}, \ldots, a_{k}\}
We first show that ak+1ak+3a_{k+1} \geq a_{k}+3. Suppose there is a good pair (ak+2,b)(a_{k}+2, b). Since all values up to bkb_{k} already appear in a good pair with a strictly smaller other pile, b>bkb > b_{k} must hold. Since by assumption bk+1{a0,,ak}b_{k}+1 \in \{a_{0}, \ldots, a_{k}\}, b=bk+1b = b_{k}+1 is also not possible. Thus ak+2bak+2(bk+2)=ka_{k}+2-b \leq a_{k}+2-(b_{k}+2) = k, which is again a contradiction, since this difference is already occupied by a smaller good pair. Now we show that (ak+3,bk+2)(a_{k}+3, b_{k}+2) is good and thus (ak+1,bk+1)=(ak,bk)+(3,2)(a_{k+1}, b_{k+1}) = (a_{k}, b_{k}) + (3,2). Indeed, (ak+3,bk+2m)(a_{k}+3, b_{k}+2-m) is bad since all values up to bk+1b_{k}+1 already appear in a smaller good pair, (ak+3m,bk+2m)(a_{k}+3-m, b_{k}+2-m) is bad since m=1m=1 and m=2m=2 were already excluded at the beginning of this case and at the beginning of the induction, and if (ak+3m,bk+2m)(a_{k}+3-m, b_{k}+2-m) is good with m3m \geq 3, then necessarily (ak+3m,bk+2m)=(al,bl)(a_{k}+3-m, b_{k}+2-m) = (a_{l}, b_{l}) for some lkl \leq k, which is a contradiction since k+1=(ak+3m)(bk+2m)=albl=lk+1 = (a_{k}+3-m)-(b_{k}+2-m) = a_{l}-b_{l} = l. Finally, (ak+3m,bk+2)(a_{k}+3-m, b_{k}+2) is also bad, since m=1m=1 and m=2m=2 were already excluded, and if (ak+3m,bk+2)(a_{k}+3-m, b_{k}+2) is good with m3m \geq 3, then bk+2b_{k}+2 must be the larger pile, since otherwise it could have at most bkb_{k} stones. Thus, since bk+2bk+kakb_{k}+2 \leq b_{k}+k \leq a_{k}, bk+2{a0,,ak}b_{k}+2 \in \{a_{0}, \ldots, a_{k}\}, which contradicts our assumption bk+1{a0,,ak}b_{k}+1 \in \{a_{0}, \ldots, a_{k}\}, since by (iii) of the induction hypothesis the difference between two values from {a0,,ak}\{a_{0}, \ldots, a_{k}\} cannot be 1. Thus, we have proved (iii) for k+1k+1, from which (i) and (ii) follow directly. Additionally, from (i) it follows that N0=A(0)B(0)\mathbb{N}_{0} = A^{(0)} \cup B^{(0)}. Calculating the first few values of the sequences (ak)(a_{k}) and (bk)(b_{k}), one conjectures that the following, somewhat more illustrative recursion formula holds:
(ak,bk)={(ak1,bk1)+(2,1)if k1{a0,,ak1}(ak1,bk1)+(3,2)otherwise (a_{k}, b_{k}) = \begin{cases} (a_{k-1}, b_{k-1}) + (2,1) & \text{if } k-1 \in \{a_{0}, \ldots, a_{k-1}\} \\ (a_{k-1}, b_{k-1}) + (3,2) & \text{otherwise} \end{cases}
To show this, we need the following intermediate result, which we prove by induction for all k1k \geq 1: apparently bbk+1=akb_{b_{k}} + 1 = a_{k} and bbk+1=ak+1b_{b_{k}+1} = a_{k} + 1. The two equations hold for k=1k=1, so assume they hold for some k1k \geq 1. We make the same case distinction as before.

Case 1: bk+1{a0,,ak}b_{k}+1 \notin \{a_{0}, \ldots, a_{k}\}
We have bk+1=bk+1b_{k+1} = b_{k} + 1 and thus bbk+1+1=bbk+1+1=ak+1+1=ak+1b_{b_{k+1}} + 1 = b_{b_{k}+1} + 1 = a_{k} + 1 + 1 = a_{k+1} by our induction hypothesis. Since in particular bbk+1+1{a0,,abk+1}b_{b_{k}+1} + 1 \in \{a_{0}, \ldots, a_{b_{k}+1}\}, it follows from our already proven recursion formula that bbk+1+1=bbk+2=bbk+1+2=ak+3=ak+1+1b_{b_{k+1}+1} = b_{b_{k}+2} = b_{b_{k}+1} + 2 = a_{k} + 3 = a_{k+1} + 1.

Case 2: bk+1{a0,,ak}b_{k}+1 \in \{a_{0}, \ldots, a_{k}\}
In this case, bk+1=bk+2b_{k+1} = b_{k} + 2 and ak+1=ak+3a_{k+1} = a_{k} + 3. By the induction hypothesis, bbk+1+1=ak+2<ak+1b_{b_{k}+1} + 1 = a_{k} + 2 < a_{k+1}, and thus bbk+1+1{a0,,abk+1}b_{b_{k}+1} + 1 \notin \{a_{0}, \ldots, a_{b_{k}+1}\}. It follows that bbk+1+1=bbk+2+1=bbk+1+1+1=ak+1+1+1=ak+1b_{b_{k+1}} + 1 = b_{b_{k}+2} + 1 = b_{b_{k}+1} + 1 + 1 = a_{k} + 1 + 1 + 1 = a_{k+1}. Since in particular bbk+2+1{a0,,abk+2}b_{b_{k}+2} + 1 \in \{a_{0}, \ldots, a_{b_{k}+2}\}, we also get bbk+1+1=bbk+3=bbk+2+2=ak+1+1b_{b_{k+1}+1} = b_{b_{k}+3} = b_{b_{k}+2} + 2 = a_{k+1} + 1. Thus, the two equations are proved.

Now we can show the following equivalence: bk+1{a0,,ak}k{a0,,ak}b_{k}+1 \in \{a_{0}, \ldots, a_{k}\} \Longleftrightarrow k \notin \{a_{0}, \ldots, a_{k}\}. For if bk+1=alb_{k}+1 = a_{l} then l1l \geq 1 and thus bk+1=al=bbl+1b_{k}+1 = a_{l} = b_{b_{l}} + 1 and thus bk=bblk=blk{a0,,ak}b_{k} = b_{b_{l}} \Longrightarrow k = b_{l} \Longrightarrow k \notin \{a_{0}, \ldots, a_{k}\}. And if k{a0,,ak}k \notin \{a_{0}, \ldots, a_{k}\}, then there is l1l \geq 1 with k=blk = b_{l} and thus bk+1=bbl+1=al{a0,,ak}b_{k}+1 = b_{b_{l}} + 1 = a_{l} \in \{a_{0}, \ldots, a_{k}\}. This equivalence leads directly to the more illustrative recursion formula. Now, if we define sk={l0al<k}s_{k} = |\{l \geq 0 \mid a_{l} < k\}|, it follows that ak=3(ksk)+2sk=3kska_{k} = 3(k - s_{k}) + 2 s_{k} = 3k - s_{k}. Finally, we come to the actual proof.

Suppose there is a KK such that (mk)kK(m_{k})_{k \geq K} is periodic with period c1c \geq 1. Set A:=aK+caKA := a_{K+c} - a_{K}, then from periodicity it follows that ak+cak=Aa_{k+c} - a_{k} = A for all kKk \geq K. We also note that if kaKk \geq a_{K}, then {l0kal<k+A}=c|\{l \geq 0 \mid k \leq a_{l} < k+A\}| = c, so sk+A=sk+cs_{k+A} = s_{k} + c for all kaKk \geq a_{K}. Now let kmax{K,aK}k \geq \max\{K, a_{K}\}, then we get
ak+A2=ak+cA=3(k+cA)sk+cA=3(k+cA)skc2 a_{k} + A^{2} = a_{k + cA} = 3(k + cA) - s_{k + cA} = 3(k + cA) - s_{k} - c^{2}
and thus
A23cA+c2=3kaksk=0 A^{2} - 3cA + c^{2} = 3k - a_{k} - s_{k} = 0
From this, we finally obtain that Ac{φ2,φ2}\frac{A}{c} \in \{\varphi^{-2}, \varphi^{2}\}, where φ\varphi is the golden ratio. This is a contradiction, since φ2\varphi^{-2} and φ2\varphi^{2} are irrational.

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 reproduced verbatim; metadata (topic, difficulty) added by this project.