Puzzles/Two-player games/Picking game/Solution

< Puzzles < Two-player games < Picking game

The puzzle as stated doesn't quite state how a "tie" is possible, unless you can refuse to draw. If we assume you -must- draw 1 or 2 matches on your turn, then:


Basically, if there are 3n matches, you're in a losing state, because no matter what you choose, your opponent can leave you in a state 3(n-1) by choosing the opposite (IE 1 + 2 == 3 or 2 + 1 == 3). When n = 1, this 3(n-1) = 3(0) = 0 and your opponent wins because (s)he has drawn the last match. If there are 3n+1 or 3n+2 matches, you choose 1 or 2 respectively, and always leave your opponent 3m matches and you will win, and by the same logic you will win.

So basically, if you both play perfectly, the first player can only win if n Matches mod 3 is nonzero.

Alternatively, if you can refuse to draw a match (possibly intended by the question) you would always draw n mod 3 matches - if it's a multiple of 3 you refuse to draw, otherwise you draw leave a multiple of 3 matches.

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.