Optimal strategy for chips game

250 Views Asked by At

'I have 12 poker chips, we (two people) take it in turns to pick up one or two chips, you win if you don't pick up the last chip. What is the optimal strategy? Do you want to go first or second? What about if there were 150 chips?'

I concluded that I would always want to play first and take two chips on the first go to guarantee a win, for both the 12 chip game and 150 chip game. I am unsure if this is correct but my reasoning was:

Let the expression $k:W(1)$ mean I can guarantee a win by taking the $k$th chip, $k:W(2)$ to mean that I can guarantee a win by taking the $k$th chip and $(k+1)$th chip and $k:L$ to mean I am guaranteed a loss if I have to pick up either only the $k$th chip or both the $k$th chip and $(k+1)$th chip. Then working backwards from the 12th chip I concluded:

$12: L$ $11: W(1)$

$10: W(2)$

$9:L$

$8:W(1)$

$7:W(2)$

$6:L$

$5:W(1)$

$4:W(2)$

$3:L$

$2:W(1)$

$1:W(2)$

And as 150 is also divisible by 3 we'd find the same pattern in that case.

Is this correct?

2

There are 2 best solutions below

0
On

Go backwards.

One chip, you lose.
Two or three chips, you take one or two and leave one for me, I lose.
Four chips, you take one or two and leave me three or two, I win, you lose.

In general, 3k+1 chips you lose. 3k you take two chips so I have 3(k-1)+1 and lose, 3k+2 you take one chip so I have 3k+1 and lose.

0
On

Alternative approach:

Since each player must take either 1 or 2 chips, if it is your opponent's turn to play, and there are currently $~N~$ chips, you can force it to be your opponent's turn to play when there are $~N-3~$ chips.

You simply take 2 if he took 1, and vice versa. Then, considering that the person on turn must lose if there is only 1 chip left, the only losing positions are those where $~N \equiv 1 \pmod{3}.~$

Once you force your opponent to be on move when $~N \equiv 1 \pmod{3},~$ you can keep him on move on that $~\pmod{3}~$ congruency class. So, your opponent is kept on move, with the number of chips necessarily decreasing, and your opponent is kept on $~1 \pmod{3}.~$

Therefore, your opponent can't escape being on turn, when there is $~1~$ chip left.


More generally, if you are required to take $~x~$ chips, where $~x~$ is some element in $~\{1,2,3,\cdots,k\},~$ then you have a $~\pmod{k+1}~$ argument.

That is, the exact same analysis as at the start of this answer applies. You force your opponent to be on move, when $~N \equiv 1 \pmod{k+1}.$ Then, if your opponent takes $~r~$ chips, where $~r \in \{1,2,3,\cdots,k\},~$ then you take $~(k+1)-r~$ chips, so on your opponent's next move, he is kept prisoner within the $~N \equiv 1 \pmod{k+1}~$ congruency class.