Here we present you with a very ancient game - the game of "Nim" 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 x and y 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 S0; the player who reaches S0 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) or S1′(2,1) wins, because leaving S1 or S1′ 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) or S2′(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 α the famous golden ratio 1: the root of the equation α2=α+1, equal to (1+5)/2, or approximately 1.618, then the coordinates of the winning point with number n are 2:
a) the integer part of (nα),
b) the integer part of (nα)+n.
Source: NuminaMath-1.5,
licensed Apache-2.0.
Statement and solution reproduced as published; topic, difficulty and ordering added
by this site.