Cut The Knot!by Alex Bogomolny |
Single Pile Games
October 2002
The Game of Nim is played with several piles of objects. That the game starts with more than one pile is important. Since there is no limitation on how many objects can be removed on a move, Nim, on a single pile, is a bland, one move win for a first player. The situation changes when the rules of the games introduce limitations on available moves. For example, Scoring and the Subtraction games may be meaningfully played on a single pile. Scoring limits the size of a move from above. In the Subtraction games, the move is restricted to a finite set of alternatives.
One Pile is the most direct generalization of Scoring and the simplest of the Subtraction games. On each move a player is permitted to remove any number of objects bounded both from above and below. (In the applet, a move is performed by pressing one of the buttons located on the perimeter of the drawing area. The Min and Max attributes can be modified by clicking a little off their central line.)
The Grundy numbers for the various sizes of the pile are easily found with the Mex rule. For example, for
Pile size | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Grundy number | 0 | 0 | 0 | 1 | 1 | 1 | 2 | 2 | 0 | 0 | 0 | 1 | 1 | 1 | 2 | 2 | 0 | 0 | 0 | 1 | 1 |
The P-positions correspond to the piles whose size S falls into the range
There is a small body of literature that delves into the variations of One Pile in which Min = 1 while Max depends on the previous move. These are usually referred to as the Take-Away games. On the first move a player is allowed to remove any number of objects, but the whole pile. Assuming x is the size of a move -- the number of the removed objects -- let f(x) stand for the maximum number of objects that could be legally removed on the subsequent move. Different choices of the function f lead, in principle, to different games. The following applet implements three prototypical games corresponding to
Schwenk makes a case for the importance of the losing starting positions, i.e. the positions in which, all other factors equal, the second player has a winning strategy. In all games, the smallest losing position holds a single object. (The second player wins without lifting a finger. See, e.g. Russell.)
Let then H1 = 1 and define the sequence Hk+1 = Hk + Hm, where
The fact that the sequence {Hi} consists of losing starting positions stems from two assertions.
(1) | Any natural number N can be uniquely represented as the sum Hj1 + Hj2 + Hj3 + ... + Hjk, where, for i = 1, ..., k-1, | |
(1) leads to a game specific binary representation of the size of the pile - position in a game.
(2) | Unless the size N of the pile is one of Hji, there are | |
Such a move reduces the number of units /N/ and also insures that the next move could not accomplish the same feat. Thus, if the game is played right, unit reduction is only possible on every other move. Unit reduction is the key to the ultimate success because the only integer N for which
Let's now determine the sequence {Hj} for the three games. By definition, {Hj} is always increasing.
f(x) = x
H1 = 1, H2 = H1 + H1 = 2, H3 = H2 + H2 = 4, and, since
f(x) = 2x - 1
H1 = 1, H2 = H1 + H1 = 2, H3 = H2 + H2. By induction, if
A surprise! Here too, Hi = 2i.
f(x) = 2x
H1 = 1, H2 = H1 + H1 = 2, and, since
Hi = Fi, i = 1, 2, ..., where Fi, i = 0, 1, 2, ... are the Fibonacci numbers 1, 1, 2, 3, 5, ... Which explains why the latter game is known as the Fibonacci Nim.
(1) is then a generalization of E. Zeckendorf's theorem. Zeckendorf has proved that every positive integer N has a unique expansion into the sum of distinct Fibonacci numbers that contains no two successive terms of the Fibonacci sequence. (Does not this contradict the well known identity,
Daykin showed that Zeckendorf's theorem gives in fact a characterization of the Fibonacci sequence: if {fi} is a sequence such that any positive integer has a unique representation as the sum of fi's with no two successive terms in the expansion, then {fi} is necessarily increasing and
Similarly, if we assume that a sequence {hi} is increasing and every positive integer has a unique representation (1) as the sum
The proof is left to the reader as a playful exercise.
References
- D. E. Daykin, Representation of Natural Numbers As Sums of Generalized Fibonacci Numbers, J London Math Soc, 35 (1960), 143-160
- B. Russell, In Praise of Idleness, Routledge, 1996
- A. J. Schwenk, Take-Away Games, The Fibonacci Quarterly, v 8, no 3 (1970), 225-234
Fibonacci Numbers
- Ceva's Theorem: A Matter of Appreciation
- When the Counting Gets Tough, the Tough Count on Mathematics
- I. Sharygin's Problem of Criminal Ministers
- Single Pile Games
- Take-Away Games>
- Number 8 Is Interesting
- Curry's Paradox
- A Problem in Checker-Jumping
- Fibonacci's Quickies
- Fibonacci Numbers in Equilateral Triangle
- Binet's Formula by Inducion
- Binet's Formula via Generating Functions
- Generating Functions from Recurrences
- Cassini's Identity
- Fibonacci Idendtities with Matrices
- GCD of Fibonacci Numbers
- Binet's Formula with Cosines
- Lame's Theorem - First Application of Fibonacci Numbers
|Contact| |Front page| |Contents| |Algebra|
Copyright © 1996-2018 Alexander Bogomolny
Generalized Converse of Zeckendorf's Theorem
We are given that every positive integer N can be uniquely represented as a sum
If
The first of the inequalities is impossible, because then, taking
Assume then hk+1 < hk + hm. Then
(4) | hm-1 < hk+1 - hk < hm. | |
As before, the expansion of hk+1 - hk is bound to include hm-1:
hk+1 - hk = hj1 + ... + hjn, | ||
where f(hji) < hji+1, I = 1, ..., n-1, and
hk+1 = hj1 + ... + hjn + hk, | ||
which, too, contradicts the uniqueness assumption.
As we see, hk+1 = hk + hm is the only possibility.
|Contact| |Front page| |Contents| |Algebra|
Copyright © 1996-2018 Alexander Bogomolny
72111979