Maths Olympiad Prep

Library / /2 of 4

, 2020

Combinatorics Difficulty 7.6 National olympiad, round 2 Prove it Netherlands

Ward and Gabrielle are playing a game on a large sheet of paper. At the start of the game, there are 999 ones on the sheet of paper. Ward and Gabrielle each take turns alternatingly, and Ward has the first turn. During their turn, a player must pick two numbers aa and bb on the sheet such that gcd(a,b)=1\gcd(a, b) = 1, erase these numbers from the sheet, and write the number a+ba+b on the sheet. The first player who is not able to do so, loses. Determine which player can always win this game.

Solution

Gabrielle can always win using the following strategy: during each of her turns, she picks the largest two numbers on the sheet as aa and bb. Using induction on kk, we will prove that she is always allowed to do so, and that after her kk-th turn, the sheet contains the number 2k+12k + 1 and 9982k998 - 2k ones.

In his first turn, Ward can only pick a=b=1a = b = 1, after which the sheet contains the number 22 and 997997 ones. Gabrielle then picks the two largest numbers, a=2a = 2 and b=1b = 1, after which the sheet contains 33 and 996996 ones. This finishes the basis k=1k = 1 of the induction.

Now suppose that for some m1m \ge 1 after Gabrielle's mm-th turn the sheet contains the number 2m+12m + 1 and 9982m998 - 2m ones. If 9982m=0998 - 2m = 0, then Ward cannot make a move. If not, then Ward can do one of two things, either pick a=b=1a = b = 1 or pick a=2m+1a = 2m + 1 and b=1b = 1. We consider these two cases separately:

* If Ward picks a=b=1a = b = 1, then the sheet contains the number 2m+12m + 1, the number 22, and 9962m996 - 2m ones. Gabrielle then picks the two largest numbers, so a=2m+1a = 2m + 1 and b=2b = 2 (which is allowed since their gcd is 11). After her turn the sheet contains the numbers 2m+3=2(m+1)+12m+3 = 2(m+1)+1 and 9962m=9982(m+1)996 - 2m = 998 - 2(m+1) ones.

* If Ward picks a=2m+1a = 2m + 1 and b=1b = 1, then the sheet contains the number 2m+22m+2 and 9972m997 - 2m ones. Gabrielle then picks the two largest numbers, so a=2m+2a = 2m + 2 and b=1b = 1 (which is allowed since their gcd is 11). Note that there is a one left, as 9972m997 - 2m is odd, so not equal to 00. After her turn the sheet contains the numbers 2m+3=2(m+1)+12m + 3 = 2(m + 1) + 1 and 9962m=9982(m+1)996 - 2m = 998 - 2(m + 1) ones.

This completes the induction.

Therefore Gabrielle can always make a move. After Gabrielle's turn 499499 the only number left on the sheet is 999999, so Ward can no longer make a move, and Gabrielle wins.

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: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic and difficulty added by this site.