You and a friend play a game where you start with a pile of 1000 stones, and each turn you can either add 2 stones to the pile or remove 10 stones. So, once you have fewer than 10 stones in the pile, you can only add 2 stones.
The player to remove the last stone wins.
Which player has a winning strategy?
Image credit: https://www.gardenoasis.co.uk
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
I didn't realize you couldn't remove all the stones if there were less than 10 :( Could you maybe clarify that?
Log in to reply
Done. How's that?
Let person 1 be the one who plays first, and person 2 be the one who plays second. Let A be the number of "add 2 stones" moves by persons 1 and 2 combined, and S be the number of "subtract 10 stones" moves by persons 1 and 2 combined.
The event "no stone is left" satisfies the equation 1 0 0 0 + 2 A − 1 0 S = 0 , or rewriting, A = 5 S − 5 0 0 . Clearly, A ⩾ 0 , and thus S ⩾ 1 0 0 . Now, if S is even, then S = 2 k , k ∈ Z + , and A = 5 ( 2 k ) − 5 0 0 = 1 0 k − 5 0 0 = 1 0 ( k − 5 0 ) ≡ 0 ( m o d 2 ) so that A is also even. Now, if S is odd, so that S = 2 k + 1 , k ∈ Z + , then A = 5 ( 2 k + 1 ) − 5 0 0 = 1 0 k − 4 9 5 = 5 ( 2 k − 9 9 ) ≡ 1 ( m o d 2 ) so that A is also odd.
In both cases, we have shown that A + S is always even. But A + S is the total number of moves done by persons 1 and 2 combined. Therefore, this implies that if person 1 moves first, then the game ends with person 2 as the last move (the winning move). Thus the one who goes second has the winning strategy.
PS: Actually, it follows from above that even if person 2 doesn't have any strategy, person 2 will always win no matter what moves they do! (provided, of course, that person 1 moves first)
Problem Loading...
Note Loading...
Set Loading...
Every two turns the number of stones in the pile will be divisible by four. Therefore, the first player will never be able to remove the last stone, since he will always be presented with a number that is divisible by 4.
The strategy for the second player is to keep removing 10 stones until the number of stones left is less than 10.
Then, when the number gets to 10, remove the final 10!