Pebble Challenge: Who Wins & Why?

  • Context:
  • Thread starter Thread starter sadsadsadsa
  • Start date Start date
  • Tags Tags
    Challenge
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 2K views
sadsadsadsa
Messages
15
Reaction score
0
There are 100 pebbles on the table. There are two players, A and B, who move alternatively. Player A moves first. The rules of the game are the same for both players: at each move they can remove one, two, three, four of five pebbles. The winner is the player who takes the last pebble. Who is guaranteed to win provided that he plays properly? Convince me why you think this. Same question if the one who takes the last pebble loses.
 
Mathematics news on Phys.org
sadsadsadsa said:
There are 100 pebbles on the table. There are two players, A and B, who move alternatively. Player A moves first. The rules of the game are the same for both players: at each move they can remove one, two, three, four of five pebbles. The winner is the player who takes the last pebble. Who is guaranteed to win provided that he plays properly? Convince me why you think this. Same question if the one who takes the last pebble loses.

Suppose we start the game with 5 or less pebbles, then A can take them all and wins.
When we start with 6 pebbles, A has to take one, but can't take them all, so the next player will win.
With 7-11 pebbles, A can reduce the number to 6, bringing B to a position that he will be forced to let A win.

Generally, the winning strategy is to reduce the pebbles to a multiple of 6.
Then, when the pebbles are down to 6, the opponent will be forced to let you win.
When we start with 100 pebbles, A should start with 4 pebbles, guaranteeing his win (since $96 = 16\times 6$).

When the one who takes the last pebble loses, we want to end at 1 pebble.
The winning strategy is then to reduce to a multiple of 6 plus 1.
So A should start with 3 pebbles (since $97 = 16\times 6 + 1$).