Maths Olympiad Prep

Track / Stage 5 / 281 of 400 #881 of 1964

Problem 881

AIME late
Combinatorics Difficulty 5.7 Find the answer

## 3. The Game with a Pack of Cigarettes

Here we present you with a very ancient game - the game of "Nim" 1{ }^{1}.

Take a pack of cigarettes, preferably unopened. Divide it into two unequal piles (for example, seven and thirteen cigarettes). Choose a partner and start the game, taking turns to remove either a certain number of cigarettes from only one pile, or the same number of cigarettes from each pile. (If you start, you can, for example, remove four cigarettes from the first pile or five cigarettes from both piles.)

The player who takes the last cigarette wins.

Can you indicate how to play this game to win?[^19]

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Official solution

3. Let's represent each situation encountered in our game by considering the number of cigarettes in the two corresponding piles as the coordinates xx and yy of a point on the plane. This will result in a diagram of the following type:

!

When playing, we move either parallel to one of the coordinate axes or parallel to the bisector of the (first) coordinate angle, moving closer to the origin S0S_{0}; the player who reaches S0S_{0} wins. Consequently, the player who reaches one of the two coordinate axes or the bisector loses. Therefore, the player who reaches the point S1(1,2)S_{1}(1,2) or S1(2,1)S_{1}^{\prime}(2,1) wins, because leaving S1S_{1} or S1S_{1}^{\prime} can only result in landing on one of the three named lines. Hence, the player who lands on one of the three lines leading to each of these points loses. Therefore, the player who reaches the point S2(3,5)S_{2}(3,5) or S2(5,3)S_{2}^{\prime}(5,3) wins, and so on.

Step by step, we arrive at a sequence of winning positions (along which one should move without leaving it throughout the entire game):

!

and to a sequence of positions symmetric to the given one relative to the bisector of the coordinate angle.

Note that the difference between the coordinates is equal to the number of the corresponding point. Also note that if we denote by α\alpha the famous golden ratio 1{ }^{1}: the root of the equation α2=α+1\alpha^{2}=\alpha+1, equal to (1+5)/2(1+\sqrt{5}) / 2, or approximately 1.618, then the coordinates of the winning point with number nn are 2{ }^{2}:

a) the integer part of (nα)(n \alpha),

b) the integer part of (nα)+n(n \alpha) + n.

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