Who will be the winner if $A$ is always the first to go?

111 Views Asked by At

$A$ and $B$ play a folk game as follows. There are $n$ sticks on the table. Each person takes turns picking up the number of sticks that are one of three numbers $1,2$ or $3$. If the last person is picked up, it will be the winner. Who will be the winner if $A$ is always the first to go?

For example:

  • With $n=3$. The result is $A$ because $A$ picks up $3$ stick and win.
  • With $n=4$. The result is $B$ because:
  • If $A$ picks up $3$ sticks then $B$ picks up $1$ stick and win.
  • If $A$ picks up $2$ sticks then $B$ picks up $2$ sticks and win.
  • If $A$ picks up $1$ sticks then $B$ picks up $3$ sticks ans win. Finally, in this case $B$ always wins.

    My problem is to defining who is the winner when we know $n$.

1

There are 1 best solutions below

1
On BEST ANSWER

If the number of sticks is a multiple of 4 then $B$ can play so that he will always win. Indeed, during each round, if $A$ picks up $i$ sticks for whatever $i=1,2,3$; then $B$ responds by picking up $4-i$ sticks.

If the number of sticks mod 4 is $k$ for any $k \in \{1,2,3\}$ then $A$ can force the game so he always wins. Indeed $A$ picks $k$ sticks the first round, so the number of sticks left is a multiple of 4. So it is now a new game this time with $4n$ sticks for some integer $n$, where $B$ has to go first. So $A$ can play that he can always win, just as $B$ could play that he would always win as in the previous paragraph.