Maths Olympiad Prep

Library / /19 of 520

Combinatorics Difficulty 4.8 AIME 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, 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 (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.

A number or a short expression. Spacing and $ signs are ignored.

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.

Therefore a kk-unhappy position is winning for Alice if kk is odd, and drawing if kk 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.

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