Quoto

Learn / Library / Brainteasers

Restricted chip taking

BrainteasersMedium

A pile has chips. players alternate, and on each move a player removes exactly , or chips; a move that needs more chips than remain is not allowed. The player who cannot move loses, so whoever takes the last chip wins. You move first and both players play optimally. How many chips must you remove on your first move to guarantee a win?

Checking an answer needs JavaScript. The hint and the solution open without it.

A whole number, a decimal, a fraction like 3/8 or a percent.

Hint

Label pile sizes from upward as won or lost for the player to move, and look for a repeating pattern.

Solution
  1. Size is lost for the mover; sizes , and are won by taking everything, and size is lost because the only move leads to .
  2. Continuing, sizes and are won, since they reach by removing or , while is lost because its moves lead to , and .
  3. The pattern repeats with period : the lost sizes are those with remainder or on division by .
  4. From the moves lead to , and , and only is lost, because .
  5. So you remove chips first.

Answer: