Alice and Bob play the following game: They start with two non-empty piles of coins. Taking turns, with Alice playing first, each player chooses a pile with an even number of coins and moves half of the coins of this pile to the other pile. The game ends if a player cannot move, in which case the other player wins.
Determine all pairs of positive integers such that if initially the two piles have and coins respectively, then Bob has a winning strategy.
Solution
By we denote the largest nonnegative integer such that .
A position (i.e. two piles of sizes and ) is said to be -happy if for some integer , and -unhappy if , then .
Therefore a -unhappy position is winning for Alice if is odd, and drawing if is even.
Want a route through all this instead of an archive? The track
puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.