There are a buch of 2000 stones. Two players play alternatively, following the next rules: ($a$)On each turn, the player can take 1, 2, 3, 4 or 5 stones of the bunch. ($b$) On each turn, the player has forbidden to take the exact same amount of stones that the other player took just before of him in the last play. The loser is the player who can't make a valid play. Determine which player has winning strategy and give such strategy.
Problem
Source: Spanish Communities
Tags: induction, number theory unsolved, number theory
16.04.2006 09:27
carlosbr wrote: ($a$)On each turn, the player can take 1, 2, 3, 4 or 5 stones or the bunch. Are you sure you intended this? The first player can take the entire pile, and then the second player has no more valid moves.
23.04.2006 16:38
The first player has a winning strategy. But, my solution is quite long, so, if someone has a nice (and short) solution, please, post it!
18.08.2010 02:37
Suppose there are $n$ stones on the bunch, being $n$ a positive integer. Then the first player has a winning strategy if and only if $n\not\equiv_{13}0,7$. This statement is easily proven using strong induction. Since $2000\equiv_{13}11$, for $n=2000$ the first player wins. My solution is also quite long, I have one written in Portuguese in my computer, but it's hard to translate.
24.08.2010 17:59
Any other solutions ?
24.09.2010 11:10
I found the following solution, and basically all other (complete) solutions that I have seen since, are along the same line: Denote by $(a,b)$ the situation where $a$ stones are remaining, and in the previous move $b$ have been removed; let $(a,?)$ denote the generic situation where $a$ stones are remaining, and any possible number of stones have been removed in the previous move, and let $(a,\bar{b})$ denote the generic situation where $a$ stones are remaining, and any number of stones except for $b$ have been removed in the previous move. We will say that $(a,b)$ wins if the player that moves in this situation has a winning strategy, and we will say that $(a,b)$ looses if, no matter how a player moves in this situation, the opponent has a winning strategy for any possible resulting situation. We assume that both players play intelligently. We need "only" to find values $a''>a'$ such that all outcomes from $(a''-b,c)$ and $(a'-b,c)$ are the same for all $b,c\in\{1,2,3,4,5\}$, then clearly the outcomes will be the same for $(a'',b)$ and $(a',b)$ for all $b$, and by trivial induction, the outcome of $(a,b)$ will be periodic on $a$ for all $b$, with period $a''-a'$, starting from $a'-5$. Clearly $(0,?)$ and $(1,1)$ loose because no move is possible, but $(1,\bar{1})$ wins removing one stone. $(2,2)$ wins removing one stone because $(1,1)$ looses, and $(2,\bar{2})$ wins removing $2$ stones, hence $(2,?)$ wins. $(3,3)$ looses because both $(1,2)$ and $(2,1)$ win, but $(3,\bar{3})$ wins removing three stones. $(4,\bar{4})$ wins removing four stones, but $(4,4)$ looses because $(1,3)$, $(2,2)$ and $(3,1)$ win. We proceed similarly (and tediously), analizing for each case $(a,b)$ with increasing $a$, whether the player that moves can produce for the other player a situation that looses, or no matter how many stones are removed, the other player will inherit a winning situation, hence classifying the situations respectively as winning or loosing. We thus obtain that: $(9,?)$, $(10,?)$, $(11,\bar{4})$, $(12,\bar{5})$, $(22,?)$, $(23,?)$, $(24,\bar{4})$, $(25,\bar{5})$ win $(11,4)$, $(12,5)$, $(13,?)$, $(24,4)$, $(25,5)$ and $(26,?)$ loose. Therefore, the results are periodic with period $13$ starting from $a=9$, or since $2000=13\cdot153+11$, then $(2000,\bar{4})$ wins and $(2000,4)$ looses. Since there is no previous move, the initial situation is $(2000,\bar{4})$, hence the player that starts has a winning strategy, and wins retiring $4$ stones in the first move.
25.09.2021 11:25
carlosbr wrote: There are a buch of 2000 stones. Two players play alternatively, following the next rules: ($a$)On each turn, the player can take 1, 2, 3, 4 or 5 stones of the bunch. ($b$) On each turn, the player has forbidden to take the exact same amount of stones that the other player took just before of him in the last play. The loser is the player who can't make a valid play. Determine which player has winning strategy and give such strategy. A has the winning strategy. The strategy for $A$ is simple:-He tries to reduce $2000$ to an $0,7,5 \pmod {13}$ number irrespective of what $A$ plays. At first $2000 \equiv 11 \pmod 13$ If $B$ plays $1$ then $A$ plays $3$ If $B$ plays $2$ then $A$ plays $4$ If $B$ plays $3$ then $A$ plays $1$ If $B$ plays $4$ then $A$ plays $2$ If $B$ plays $5$ then $A$ plays $1$ In all cases $A$ wins.