Puzzling Stack Exchange is a question and answer site for those who create, solve, and study puzzles. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Alice and Bob play the following game with two heaps of $10,000$ and $20,000$ marbles.

  • Alice and Bob move alternatingly. Alice makes the first move.
  • In every move, the active player may
    (i) either remove $x\ge1$ marbles from the first heap,
    (ii) or remove $y\ge1$ marbles from the second heap,
    (iii) or remove $x\ge1$ marbles from the first heap and $y\ge1$ marbles from the second heap, where $x+y$ is divisible by $2016$.
  • The player who takes the last marble wins the game.

Question: Which player is going to win this game?
(As usual, we assume that Alice and Bob both use optimal strategies.)

share|improve this question
up vote 16 down vote accepted

Alice wins

This is how:

Alice first takes $9.112$ marbles from the first heap and $19.112$ from the second heap ($9.112 + 19.112 = 28.224 = 2.016 * 14$), leaving 888 marbles on each heap. From that on she just mirrors Bob's move keeping the heaps equal sized, making it impossible for Bob to win.

share|improve this answer
Seems too easy. I wonder if this was close to the intended solution. – Trenin Feb 11 at 12:51
@Trenin The game is a variation on a game originally proposed by Martin Gardner, where you could not take marbles from both heaps in the same move. This solution is the same, except it makes sure that Bob cannot again de-symmetrize the configuration by taking marbles from both piles simutaneously. Basically, Ivo's solution is to make the problem identical Martin Gardner's, where Alice always wins. – MariusMatutiae Feb 11 at 14:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.