Päevaülesanne

Juhuslik

Harjutuskomplekt

Balti Tee 2011 · Valikvooru ülesanne

Kombinatoorika

Aino and Väinö start to play the game GCD(m,nm, n) where mm and nn are positive integers. In the beginning there are two piles of stones on the table, one with mm stones, another with nn stones. The one whose turn it is, takes away a number of stones from one of the piles. This number is a multiple of the number of stones in the other pile. Aino starts, and the players take turns until one of the piles is empty. The one who manages to empty a pile, wins. Prove that there is an α>1\alpha > 1 such that if mm and nn are positive integers with m>αnm > \alpha n, then Aino has a winning strategy in the game GCD(m,nm, n), whereas if αn>m>n\alpha n > m > n Väinö has.

Muuda valikut

Kui oled valmis

Ülevaatematerjal muutub kättesaadavaks järgmise päevaülesannete komplektiga.

Ülevaade

Teemad

Mängud ja strateegiad · Algoritmid ja protsessid · Induktsioon ja rekursioon

Lahendused

Lahendus

Choose α=(1+5)/2\alpha = (1 + \sqrt{5})/2, so that α2=α+1\alpha^2 = \alpha + 1 holds. We prove by induction on the sum m+nm+n that if m>αnm > \alpha n, then Aino has a winning strategy in GCD(m,nm, n), otherwise if αn≥m>n\alpha n \ge m > n, then Väinö has.

  1. If n∣mn \mid m, then Aino can remove all of the stones from the pile with mm stones, thus winning. This includes the initial step of the induction.

  2. Assume n<m≤αnn < m \le \alpha n. Note that α\alpha is irrational, so n<m<αnn < m < \alpha n. The rules of the game actually force Aino to remove stones from the larger pile. As m<2nm < 2n, there is no choice: she has to take exactly nn stones. The play continues with nn and m−nm-n stones in the piles, Väinö having the turn. We have 0<m−n<n0 < m-n < n and

nm−n>nαn−n=1α−1=α2−αα−1=α.\frac{n}{m-n} > \frac{n}{\alpha n - n} = \frac{1}{\alpha - 1} = \frac{\alpha^2 - \alpha}{\alpha - 1} = \alpha.

By induction, Aino has a winning strategy in the game GCD(n,m−nn, m-n), but now the turns have switched. Hence, Väinö has a winning strategy that mimicks this winning strategy of Aino's.

  1. Finally assume m>αnm > \alpha n, but n∤mn \nmid m. Write β=m/n−⌊m/n⌋\beta = m/n - \lfloor m/n \rfloor and k=⌊m/n⌋k = \lfloor m/n \rfloor. Then m=kn+βnm = kn + \beta n with 0<β<10 < \beta < 1, as n∤mn \nmid m. If 1+β<α1 + \beta < \alpha (note that β∈Q\beta \in \mathbb{Q} and α∉Q\alpha \notin \mathbb{Q}), then k≥2k \ge 2, as m>αnm > \alpha n. Therefore, Aino may take (k−1)n(k-1)n stones out of the pile of mm stones, leaving there m−(k−1)n=(1+β)nm-(k-1)n = (1+\beta)n stones. By induction hypothesis, Väinö has a winning strategy in the game GCD((1+\beta)n, n), which will now be copied by Aino in order to win the game. Otherwise, if 1+β>α1+\beta > \alpha, then Aino may take knkn stones, leaving βn\beta n stones in the heap. Again, Väinö's winning strategy in the game GCD(n,βnn, \beta n) is copied by Aino. It suffices to check that
1β<1α−1=α.\frac{1}{\beta} < \frac{1}{\alpha - 1} = \alpha.