Deterministic Zeckendorf Games
Abstract.
Zeckendorf [Ze] proved that every positive integer can be written uniquely as the sum of non-adjacent Fibonacci numbers. We further explore a two-player Zeckendorf game introduced in [BEFM1, BEMFcant]: Given a fixed integer and an initial decomposition of , players alternate using moves related to the recurrence relation , and the last player to move wins. We improve the upper bound on the number of moves possible and show that it is of the same order in as the lower bound; this is an improvement by a logarithm over previous work. The new upper bound is , and the existing lower bound is sharp at moves, where is the number of terms in the Zeckendorf decomposition of and is the sum of indices in the same Zeckendorf decomposition of . We also studied four deterministic variants of the game, where there was a fixed order on which available move one takes: Combine Largest, Split Largest, Combine Smallest and Split Smallest. We prove that Combine Largest and Split Largest realize the lower bound. Split Smallest has the largest number of moves over all possible games, and is close to the new upper bound. For Combine Split games, the number of moves grows linearly with .
Keywords: Fibonacci numbers, Zeckendorf decomposition, game theory.
MSC 2010: 11P99 (primary), 11K99 (secondary).
The authors were partially supported by NSF grants DMS1265673 and DMS1561945. We thank the Elite Scholars Program for facilitating this collaboration.
1. Introduction
1.1. The Zeckendorf Game
The Fibonacci numbers are among the most interesting and famous sequences; see [Kos] for a collection of some of their properties. We define them by and ; with these initial conditions we have Zeckendorf’s Theorem [Ze]: every positive integer has a unique representation as a sum of non-adjacent Fibonacci numbers.111We clearly lose uniqueness if we include or start . For example,
There is now an extensive literature on proofs of this theorem and generalizations; see for example [Al, Br, CFHMN1, CFHMN2, CHHMPV, Day, DDKMMV, Fr, GTNP, Ha, Ho, Ke, Len, MW1, MW2].
Baird-Smith, Epstein, Flint and Miller [BEFM1, BEFM2] create a game based on the Zeckendorf decompositions. We quote from [BEFM2], describing the game and previous results. We first introduce some notation. By or we mean copies of , the first Fibonacci number. If we have 3 copies of , 2 copies of , and 7 copies of , we could write either or .
Definition 1.1 (The Two Player Zeckendorf Game).
At the beginning of the game, there is an unordered list of 1’s. Let , and ; therefore the initial list is . On each turn, a player can do one of the following moves.
-
(1)
If the list contains two consecutive Fibonacci numbers, , then a player can change these to . We denote this move .
-
(2)
If the list has two of the same Fibonacci number, , then
-
(a)
if , a player can change to , denoted by ,
-
(b)
if , a player can change to , denoted by , and
-
(c)
if , a player can change to , denoted by .
-
(a)
The players alternative moving. The game ends when one player moves to create the Zeckendorf decomposition.
The moves of the game are derived from the recurrence, either combining terms to make the next in the sequence or splitting terms with multiple copies. The game is well-defined and ends after at most moves, where is the largest index such that . Thus the game takes at most order moves as the Fibonacci numbers grow exponentially fast.222With our normalization of we have is the closet integer to , where is the golden mean. The shortest game takes moves, where is the number of terms in ’s Zeckendorf decomposition; this is realized by using a Greedy Algorithm (at each turn one must move on the largest possible index). If then Player Two has a winning strategy, although the proof of this is an existence proof and does not construct a winning strategy.
1.2. Deterministic Zeckendorf Games
As the optimal strategy of the Zeckendorf Game remains elusive, we study instead four deterministic games. These are defined by specifying the order in which moves must be done. While there is thus no strategy,333Our games are equivalent to the classic card game of War, at least under the assumption that you have no freedom in how you pick up the cards. it is illuminating to study these special cases as it provides some results that clarify some of the behavior of the general game.
The four games are as follows; for each game we list the order in which the moves must be done. By adding 1’s we mean the move .
-
•
Combine largest: adding consecutive indices from largest to smallest, adding 1’s, splitting from largest to smallest.
-
•
Split largest: splitting from largest to smallest, adding consecutive indices from largest to smallest, adding 1’s.
-
•
Combine smallest: adding 1’s, adding consecutive indices from smallest to largest, splitting from smallest to largest.
-
•
Split smallest: splitting from smallest to largest, adding 1’s, adding consecutive indices from smallest to largest.
The number of moves of a game is the sum of the number of combining moves and the number of splitting moves. We let denote the number of combining moves at the index with , with of course the number of adding 1’s. Similarly the number of splitting moves at is denoted for (note we are considering adding 1’s as a combining move and not a splitting one; we explain this choice in Remark 3.4). By an abuse of notation, we also refer to combining moves at by and splitting moves at by .
Our main result is a proof of the conjecture from [BEFM1, BEFM2] that the number of moves in any game is linear in .
Theorem 1.2.
The number of moves in the longest game is bounded by , where is the number of terms in the Zeckendorf decomposition of and is the sum of indices in ’s Zeckendorf decomposition. As the number of moves is at least , each game takes order moves to play.
The previous upper bound (order ) was already very close to the known lower bound (order ), indicating that a new perspective would be needed to close the gap and have them at the same order of magnitude. We quickly sketch the key ideas, and highlight why we are able to remove the logarithmic factor. The starting point is the monovariant introduced in [BEFM1, BEFM2], which we review and expand on in §2. We use related monovariants to derive a bound growing linearly with for a weighted sum of all moves in a game except for splitting ’s or ’s. We then prove that the number of combining moves is independent of how the game is played, and the number of splitting moves at indices 2 or 3 is related to the number of combining moves at 1 and 2, which we just proved grows linearly with and completes the proof.
More is true for our deterministic games. We can rigorously determine the behavior of two of the games, and conjecture for the other two, with data strongly supporting those claims.
Theorem 1.3.
The Combine Largest and Split Largest games also realize the lower bound. Both have and .
Conjecture 1.4.
For Split Smallest, the number of moves grows linearly with ; numerically the constant appears to be the golden mean squared. For Combine Smallest games, the number of moves grows linearly with , with the constant appearing to be approximately .
We end with two conjectures. In [BEFM1, BEFM2], it was conjectured that as goes to infinity, the number of moves in a random game when all legal moves are equally likely converges to a Gaussian. The data suggests the average number of moves is approximately .
Conjecture 1.5.
The number of splitting moves in a random game converges to a Gaussian, with mean and variance approximately .
Conjecture 1.6.
It was conjectured that the longest game on any is achieved by applying splitting moves whenever possible. Specifically, the longest possible game applies moves in the following order: adding 1’s, splitting from smallest to largest, and adding consecutive indices from smallest to largest. We find another candidate for a longest possible game, with moves in the following order: splitting from smallest to largest, adding 1’s, and adding consecutive indices, from smallest to largest. This is the deterministic game Split Smallest.
2. Monovariants
We use two monovariants in our investigation. The first is obvious, and has not been explicitly isolated in earlier work.
Monovariant I: the number of terms in the decomposition of never increases throughout the game.
The proof is immediate, as we only have two types of moves. One combines two terms into one, which decreases by 1 the number of terms in the decomposition of ; the other splits a repeated term into two distinct terms, which does not change the number of summands.
Monovariant II: The sum of the indices indices in the decomposition of never increases throughout the game.
This is slightly different than the monovariant used in [BEFM1, BEFM2], where the sum of the square-root of the indices is studied. The advantage of this quantity is that this sum is strictly decreases, and must decrease by at least a fixed positive amount which is bounded below by a positive function of . Thus one can immediately deduce that the Zeckendorf game terminates. Related monovariants are used to analyze a related property of Zeckendorf decompositions, both for the Fibonacci and other recurrences: of all decompositions of an integer as a sum of Fibonacci numbers, no decomposition has fewer summands than the Zeckendorf decomposition. In [CHHMPV], the authors find conditions on recurrence relations where no decomposition has fewer summands than the Generalized Zeckedorf decomposition.
For our purposes, however, it is easier to work with Monovariant II. It is straightforward to show that the sum of the indices never increases. We only have four moves to consider (as moves involving the index 1 are defined slightly differently, we need to study that case separately).
-
•
Adding consecutive terms: If we replace with , for , we replace with , and the sum of the indices has decreased by (it is positive so long as ).
-
•
Adding 1’s: If we replace with there is no change in the sum of the indices, as .
-
•
Splitting terms: If we replace with , for , we replace with , and the sum of the indices has decreased by 1.
-
•
Splitting 2’s: If we replace with then there is no change in the sum of the indices, as .
3. Length of Games
We use the two monovariants introduced in §2 to derive bounds for weighted sums of the number of each type of move; our theorems are then immediate consequences. We first isolate some lemmas which will be useful in the proof.
3.1. Preliminary Lemmas
When the game starts, the sum of the indices is . From [BEFM1, BEFM2] the game always ends in ’s Zecknedorf decomposition, which by definition has summands. Let be the largest index such that ; this will be the largest index in ’s decomposition, and by Binet’s formula we know
(3.1) |
where is the Golden mean. As the second term above exponentially decays to zero, we have . Thus the largest index is bounded by , or
(3.2) |
which is of order .
Lemma 3.1.
The sum of the indices in ’s decomposition, , is bounded by a constant multiple of :
(3.3) |
Proof.
As the Zeckendorf decomposition cannot have adjacent summands, the maximum sum of indices is the sum of every other term to . To be safe, we start with index 2 and end at ; this negligibly increases the sum as we are only adding one more term, while the sum is on the order of the square of the largest summand. We have
(3.4) | |||||
From (3.2) we know ; thus
(3.5) |
so is bounded by a constant multiple of . ∎
We now prove the first of the two useful results on weighted sums of indices.
Lemma 3.2.
We have
(3.6) |
In particular, for we have
(3.7) |
Proof.
When the game starts we have copies of , for an index sum of ; the game ends in ’s Zeckendorf decomposition, with index sum of . Thus the change in the index sum, , must equal the change from each move. We now compute that change by looking at what happens at each index.
From §2, the index sum changes by when we combine at index if . Thus the contribution from all these moves is ; note there is no contribution when . There is no change in the index sum from adding 1’s, so will not appear in the relation; similarly will not appear as that moves also does not change the index sum. If then the splitting move at decreases the index sum by 1, so the contribution of all the splitting moves at is simply . Combining, we find
(3.8) |
The bound on follows immediately; as we will show later that the number of moves is at most , we can obtain similar linear in bounds for and . ∎
Lemma 3.3.
The number of combining moves in a game, , is independent of how the game is played, and
(3.9) |
where is the number of terms in ’s Zeckendorf decomposition.
Proof.
As we start with indices and end with indices, the change in indices throughout the game is . Each splitting move leaves the number of terms in ’s decomposition alone, while each combining move decreases the number of terms by one; (3.9) follows immediately, and we see in particular this quantity is independent of how the game is played. ∎
Remark 3.4.
The lemma above is why we view as a combining move and not a splitting move . Not only do we not have as an available summand, but with this definition all combining moves decrease the number of summands by 1 while each splitting move leaves the number unchanged.
3.2. Proof of Theorem 1.2
We now prove our main result.
Proof of Theorem 1.2.
Lemmas 3.2 and 3.3 almost suffice for the proof, as they provide bounds for weighted sums of . From Lemma 3.2 we have
(3.10) |
and thus
(3.11) |
Note the sum above misses and .
All that remains is to bound . We start the game with copies of , and let be how many ’s we have when the game terminates in ’s Zeckendorf decomposition; clearly as we cannot have a repeated summand from the definition of the Zeckendorf decomposition, and its value is independent of how the game is played. Every time we combine two 1’s to make a 2 () we decrease the number of ’s by 2, while every time we combine a 1 and a 2 to make a 3 () we decrease the number of ’s by 1. These are the only moves that decrease the number of ’s; the only moves that increase the number of ’s are the splitting moves at 1 and 2. Each splitting move at 2 () increases the number of ’s by 1, as does each splitting move at 3 (). Thus
(3.14) |
By Lemma 3.3 we can bound by , and thus
(3.15) |
Combining our bound for with what we have established in (3.13) yields
(3.16) |
which is essentially of size as is of order and is at most .
This proves the upper bound for any game grows linearly with ; as every game exactly combining moves, the lower bound is also linear in , completing the proof. ∎
3.3. Analysis of Combine Largest and Split Largest
Proof of Theorem 1.3.
We prove that the Combine Largest and Split Largest games also realize the lower bound. Remember that for each game the order in which we do moves is as follows:
-
•
Combine largest: adding consecutive indices from largest to smallest, adding 1’s, splitting from largest to smallest.
-
•
Split largest: splitting from largest to smallest, adding consecutive indices from largest to smallest, adding 1’s.
The claims follow if we can show in each game we never have a splitting move, as we showed in Lemma 3.3 that the number of combining moves is always .
We show that for these two games, at any state in the game if is in the current decomposition of and , then . We proceed by induction. The initial list, our base case, is , so the claim is true before the first move. The first move must be adding 1’s: . After this move, the statement is still true. Though not necessary, we can check and see that the claim is still true after the second and third moves.
We now turn to the inductive step; we may assume that if you look at the decomposition of then for any index if is in the list, then . Since there is no possible splitting move as each index appears at most once, our move must be chosen in the following order: adding consecutive terms from largest to smallest, and adding 1’s.
Case 1: Consecutive Terms: If the list contains two or more pairs of consecutive Fibonacci numbers, the largest is selected for the combining move. Note we cannot have in our list, as if that were the case we would have chosen as the largest term. Thus after this move we still have each index appearing at most once.
Case 2: No Consecutive Terms: If ’s decomposition does not contain consecutive Fibonacci numbers, then the only possible move is adding 1’s. Note that we cannot have in our list, as if we did we would have combined and . Thus after combining two 1’s we still do not have any index occurring more than once. ∎
4. Conjectures on the Number of Moves
Conjecture 1.4 states that for Split Smallest, the number of moves grows linearly with (numerically the constant appears to be the golden mean squared), while for Combine Smallest games, the number of moves grows linearly with (with the constant appearing to be approximately ). We arrived at these results from analyzing large numbers of games; we provide representative examples in Figures 1 and 2.




We then looked at random games. By Lemma 3.3 the number of combining moves in a game depends only on ; thus all that varies is the number of splitting moves. We played 10,000 games with equal to one million, and display the results in Figure 3 plotted against a Gaussian. The fit is very good, providing support for Conjecture 1.5.

Finally, our investigations of the four deterministic games, and Lemma 3.3 which states that all games have the same number of combining moves, provides support for Conjecture 1.6. The move counts from the two deterministic algorithms in the conjecture were identical for all .
We wrote a Java program to explore Zeckendorf games, available at
https://web.williams.edu/Mathematics/sjmiller/public_html/math/papers/ZGame.zip.
In enumerating all games with we found the two deterministic games of Conjecture 1.6 always had the largest number of moves among all games for a given .
5. Future Work
There are many questions related to the Zeckendorf game which can be investigated; several of these will be done by students of Miller in the 2020 PolymathREU. These include the following.
-
•
The lower and upper bound on game lengths differ by essentially a factor of 3; what is true about the number of moves in most games or in a random game?
- •
-
•
What if there are players; what can you say about winning strategies for various and ?
-
•
The number of combining moves is always , while the number of splitting moves appears to grow linearly with , at approximately ; prove the latter.
-
•
For each of the four deterministic games, how long do they take and who wins as a function of ?
6. Future Work
Studies of Zeckerdorff game can be extended in many more ways. This paper covered the Zeckendorf Game quite extensively. We proposed the approach to study combining/adding moves and splitting moves separately, the improved upper bounds was found on the number of moves in any game, in the end a few deterministic algorithms were analyzed. We leave the general Player 2 winning strategy for future research.
References
- [Al] H. Alpert, Differences of multiple Fibonacci numbers, Integers: Electronic Journal of Combinatorial Number Theory 9 (2009), 745–749.
- [BEFM1] P. Baird-Smith, A. Epstein, K. Flint and S. J. Miller, The Generalized Zeckendorf Game, Proceedings of the 18th International Conference on Fibonacci Numbers and Their Applications, Fibonacci Quarterly 57 (2019), no. 5 (to appear). https://arxiv.org/pdf/1809.04883.
- [BEFM2] P. Baird-Smith, A. Epstein, K. Flint and S. J. Miller, The Zeckendorf Game, Combinatorial and Additive Number Theory III, CANT, New York, USA, 2017 and 2018, Springer Proceedings in Mathematics & Statistics 297 (2020), 25–38.
- [Br] J. L. Brown, Jr., Zeckendorf’s Theorem and Some Applications, The Fibonacci Quarterly, Vol. 2, No. 3 (Oct. 1964), pages 163–168.
- [CFHMN1] M. Catral, P. Ford, P. E. Harris, S. J. Miller, and D. Nelson, Generalizing Zeckendorf’s Theorem: The Kentucky Sequence, Fibonacci Quarterly. (52 (2014), no. 5, 68–90).
- [CFHMN2] M. Catral, P. Ford, P. E. Harris, S. J. Miller, and D. Nelson, Legal Decompositions Arising from Non-positive Linear Recurrences, Fibonacci Quarterly 54 (2016), no. 4, 3448–365.
- [CHHMPV] K. Cordwell, M. Hlavacek, C. Huynh, S. J. Miller, C. Peterson and Y. N. T. Vu, On Summand Minimality of Generalized Zeckendorf Decompositions, Research in Number Theory 4 (2018), no. 43, https://doi.org/10.1007/s40993-018-0137-7.
- [Day] D. E. Daykin, Representation of Natural Numbers as Sums of Generalized Fibonacci Numbers, J. London Mathematical Society 35 (1960), 143–160.
- [DDKMMV] P. Demontigny, T. Do, A. Kulkarni, S. J. Miller, D. Moon and U. Varma, Generalizing Zeckendorf’s Theorem to -decompositions, Journal of Number Theory 141 (2014), 136–158.
- [Fr] A. S. Fraenkel, Systems of numeration, Amer. Math. Monthly 92 (1985), no. 2, 105–114.
- [GTNP] P. J. Grabner, R. F. Tichy, I. Nemes, and A. Pethö, Generalized Zeckendorf expansions, Appl. Math. Lett. 7 (1994), no. 2, 25–28.
- [Ha] N. Hamlin, Representing Positive Integers as a Sum of Linear Recurrence Sequences, Fibonacci Quarterly 50 (2012), no. 2, 99–105.
- [Ho] V. E. Hoggatt, Generalized Zeckendorf theorem, Fibonacci Quarterly 10 (1972), no. 1 (special issue on representations), pages 89–93.
- [Ke] T. J. Keller, Generalizations of Zeckendorf’s theorem, Fibonacci Quarterly 10 (1972), no. 1 (special issue on representations), pages 95–102.
- [Kos] T. Koshy, Fibonacci and Lucas Numbers with Applications, Wiley-Interscience, New York, 2001.
- [Len] T. Lengyel, A Counting Based Proof of the Generalized Zeckendorf’s Theorem, Fibonacci Quarterly 44 (2006), no. 4, 324–325.
- [MW1] S. Miller, Y. Wang, From Fibonacci Numbers to Central Limit Type Theorems, Journal of Combinatorial Theory, Series A 119 (2012), no. 7, 1398–1413.
- [MW2] S. Miller, Y. Wang, Gaussian Behavior in Generalized Zeckendorf Decompositions, Combinatorial and Additive Number Theory, CANT 2011 and 2012 (Melvyn B. Nathanson, editor), Springer Proceedings in Mathematics & Statistics (2014), 159–173.
- [Ze] E. Zeckendorf, Représentation des nombres naturels par une somme des nombres de Fibonacci ou de nombres de Lucas, Bulletin de la Société Royale des Sciences de Liège 41 (1972), pages 179–182.