In a heap there are $2021$ stones. Two players $A$ and $B$ play removing stones of the pile, alternately starting with $A$. A valid move for $A$ consists of remove $1, 2$ or $7$ stones. A valid move for B is to remove $1, 3, 4$ or $6$ stones. The player who leaves the pile empty after making a valid move wins. Determine if some of the players have a winning strategy. If such a strategy exists, explain it.
Problem
Source: Cono Sur 2021 P4
Tags: combinatorics, Combinatorial games
01.12.2021 00:33
Me in 2021: I hope the answer is that $A$ can always win . Me in 2024 (at the time this edit was written): You were right, little one...you were right... Note that by simple case checking that if there is at most $10$ stones and it's $A$'s move it only loses if there is $5$ or $10$ stones, now we claim that $A$ wins by forcing $B$ to get into the losing position mentioned above. Now $A$ starts by playing $1$. In this case if $B$ plays $3,4$ then $A$ plays $2,1$ and keeps the number of stones invariant $\pmod 5$, now if $B$ plays $1,6$ then $A$ plays $2$ and now the number of stones is $2 \pmod 5$, if $B$ plays $1,6$ here then $A$ plays $1$ and then $B$ is forced to play $1,6$ again otherwise if it did play $3,4$ then $A$ does $2,1$ keeping the number of stones $0 \pmod 5$, now if $B$ decided play $1,6$ here then $A$ plays $2$ and again the number of rocks is $2 \pmod 5$, so this means $A$ is always able to keep the number of rocks $0,2 \pmod 5$, by simple case checking note that if the number of stones is $5,10,2,7$ then $A$ wins even if $B$ started but we have noticed that $A$ can keep the number of stones $0,2 \pmod 5$ or make sure that if in the middle of being $4 \pmod 5$, the number of stones is less than $10$ and thus $A$ wins. Therefore $A$ wins either way thus we are done .
01.12.2021 00:34
MathLuis wrote: I hope the answer is that $A$ can always win . solution?
03.12.2021 08:44
$B$ can always win..
12.01.2022 14:16
You can case work to show that from $1$ to $10$, the only losing positions for A are $5$ and $10$. And it is not hard to show that $A$ can force player $B$ to play either $0$ or $2$ modulo $5$ and in both cases $B$ cannot leave a $0$ for $A$, so $\boxed{ A\; wins}$. I hope it is correct.
11.05.2023 00:46
Alguien podria darme la estrategia del jugador que gana?
11.05.2023 00:48
Beta10 wrote: Could someone give me the strategy of the winning player? converted it to englis for other peeps