Skip to main content
OlympiadHQ

Browse · MathNet

Print

AUT_ABooklet_2020

Austria 2020 counting and probability

Problem

Let be an integer. Ariane and Bérénice play a game on the set of residue classes modulo . In the beginning, the residue class is written on a piece of paper. In each move, the player whose turn it is replaces the current residue class with either or . The two players alternate with Ariane starting. Ariane has won if the residue class is reached during the game. Bérénice has won if she can permanently avoid this outcome. For each value of , determine which player has a winning strategy.
Solution
Answer. Ariane wins for and , for all other Bérénice wins.

We observe: If Ariane can win for a certain , she will also win for all divisors of , and conversely, if Bérénice can win for a certain , she will also win for all multiples of because a residue modulo is automatically a residue for all divisors of . It remains to show that Ariane wins for and Bérénice wins for and odd. All congruences in this solution are modulo .

For , Ariane has to choose in the first step. If Bérénice takes , Ariane can choose and has won. If Bérénice takes , Ariane can choose . Now, Bérénice has to decide between and . But for both, Ariane can immediately choose .

For , Bérénice chooses for all numbers except and . This clearly never gives the residue classes , or , so that Ariane also cannot choose .

For , Ariane has to choose in the first step and then Bérénice chooses again, which means that Bérénice wins.

For odd , it is not possible to reach with from another residue class. So the only possible issue for Bérénice would be the situation that both her options are among and such that she or Ariane choose . But this means that takes the residues or , so takes the residues or which are both different from and , so this cannot happen and Bérénice can permanently avoid being chosen.
Final answer
Ariane wins for n = 2, 4, 8; for all other integers n ≥ 2, Bérénice wins.

Techniques

Games / greedy algorithmsOther