Olympiad Maths Prep

Track / Stage 4 / 276 of 340 #536 of 2000

Problem 536

AMC 12 late, AIME early
Combinatorics Difficulty 5.0 Find the answer

Alice and Bob play the following game: They start with two non-empty piles of coins. Taking turns, with Alice playing first, they choose a pile with an even number of coins and move half of the coins of this pile to the other pile. The game ends if a player cannot move, or if we reach a previously reached position. In the first case, the player who cannot move loses. In the second case, the game is declared a draw.
Determine all pairs (a,b)(a, b) of positive integers such that if initially the two piles have aa and bb coins respectively, then Bob has a winning strategy.
(Cyprus)

Official solution

By v2(n)v_{2}(n) we denote the largest nonnegative integer rr such that 2rn2^{r} \mid n.
A position (a,b)(a, b) (i.e. two piles of sizes aa and bb) is said to be kk-happy if v2(a)=v2(b)=kv_{2}(a)=v_{2}(b)=k for some integer k0k \geqslant 0, and kk-unhappy if min{v2(a),v2(b)}=k+1\min \left\{v_{2}(a), v_{2}(b)\right\}=k+1, then v2(a+12b)=v_{2}\left(a+\frac{1}{2} b\right)= v2(12b)=kv_{2}\left(\frac{1}{2} b\right)=k.

Hence a kk-unhappy position is winning for Alice if kk is odd, and drawing if kk is even.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.