Archive for January 2023

In Search of a Tribonacci Building

The Wythoff array is an array of integers that can be defined through Wythoff’s game. For my purposes, I will skip over Wythoff’s game and define his array using Fibonacci numbers.

You probably heard about binary, ternary, decanary, and other bases. I am sure you know the decanary base: it is our standard decimal system. But, have you ever heard about the Fibonacci base?

Let me define it. Any positive integer can be represented uniquely as a sum of distinct Fibonacci numbers that are not neighbors. For example, 16 is 13 + 3. Now, we just write ones for Fibonacci numbers that we used and zeros for unused Fibonacci numbers, so that the digit corresponding to Fibonacci number 1 is last. (The digit corresponding to Fibonacci number 2 is second to last). Thus, 16 in the Fibonacci base is 100100. The result looks like binary, but it will never have two consecutive ones. Such a representation is called the Zeckendorf representation.

What happens if we add 0 at the end of a number in its Zeckendorf representation? This is like multiplying by 2 in binary. But, in the Fibonacci base, it corresponds to replacing every Fibonacci number in the sum with the next Fibonacci number. The result is called the Fibonacci successor. For example, the Fibonacci successor of 16 has the Zeckendorf representation 1001000 and is equal to 21 + 5 = 26.

Now back to the Wythoff array. The first row consists of the Fibonacci numbers in order. Their Zeckendorf representations look like powers of two in binary. The first column consists of numbers ending in 1 in the Zeckendorf representation, in increasing order. In other words, the Zeckendorf representations of numbers in the first column resemble odd numbers in binary. To finish the definition of the array, each number in the nth column is the Fibonacci successor of a number to its left.

As an example, let’s calculate the first three numbers of the second row. The smallest number that is not a Fibonacci number and looks odd in its Zeckendorf representation is 4, represented as 101 (remember, we are not allowed to have two consecutive ones). We place 4 in the first column of the second row. The next number in the second row has to be the Fibonacci successor of 4, so its Zeckendorf representation has to be 1010. This number equals 5+2 = 7. The Fibonacci successor of 7 is 11, with Zeckendorf representation 10100.

John Conway and Alex Ryba wrote a paper where they studied the Wythoff array. They continued the array to the left and drew walls according to a few rules. Here is a picture of their result. The picture is too small to make out the numbers, but you can see the shape, which looks like the Empire State Building. Oops, I forgot to mention, the paper is called The Extra Fibonacci Series and the Empire State Building.

My last year’s PRIMES STEP senior group (Eric Chen, Adam Ge, Andrew Kalashnikov, Ella Kim, Evin Liang, Mira Lubashev, Matthew Qian, Rohith Raghavan, Benjamin Taycher, and Samuel Wang) studied the Conway-Ryba paper and decided to generalize it to Tribonacci numbers.

Just a reminder. The Tribonacci sequence starts as 0, 0, 1, 1, 2, 4, 7, 13, 24, 44, and continues so that any next term is the sum of the three previous terms. For example, the next term after 44 is 81.

Now we need an analog of the Wythoff array for Tribonacci numbers. My readers might by now guess why I chose the above definition of the Wythoff array. Yes, this definition is perfect for generalizing to Tribonacci numbers.

We start by defining the Tribonacci base. We can represent every integer uniquely as a sum of distinct Tribonacci numbers on the condition that there are no three consecutive Tribonacci numbers in the sum. This is called a Tribonacci representation. We can express it with zeros and ones, and there will never be three ones in a row. For example, 16 can be expressed as a sum of Tribonacci numbers in the following way: 16 = 13 + 2 + 1. Thus, its Tribonacci representation is 10011.

We can define a Tribonacci successor, similarly to the Fibonacci successor, by adding a zero in the Tribonacci representation. For example, the Tribonacci successor of 16 has to have the Tribonacci representation 100110 and is equal to 24 + 4 + 2 = 30.

Now, we define the Tribonacci array similarly to the Wythoff array. The first row of the Tribonacci array consists of distinct Tribonacci numbers in order. The first column consists of integers whose Tribonacci representations end in 1. The number in the nth column is a Tribonacci successor of the number to its left.

We found many cool properties of the Tribonacci array. They are in our paper, Generalizing the Wythoff Array and other Fibonacci Facts to Tribonacci Numbers, posted on the arXiv. Let me give you three examples of these awesome properties.

1. Consider any integer sequence such that the next term is a sum of the three previous terms. We call such sequences Tribonacci-like. One of the cool properties is that, in some sense, the Tribonacci array contains all positive Tribonacci-like sequences. More formally, if a Tribonacci-like sequence has three consecutive positive terms, then the tail of such a sequence has to appear in the Tribonacci array as one of the rows.
2. It follows that multiples of any row in the Tribonacci array have to appear in the array. An awesome fact is that they appear in order.
3. Moreover, when all the numbers of a row are divisible by n, the row number minus 1 is also divisible by n.

It is easy to extend the Tribonacci array to the left, but this extension doesn’t have the same nice properties as the extension of the Wythoff array. So finding an Empire State Building, or any other building, in the Tribonacci array is futile.

Share:

The Raven’s Hat

I agreed to review the book, The Raven’s Hat, because of the hats. I love hat puzzles. When I give them to my students, I bring hats to class to reenact the solutions.

The book contains eight awesome puzzles as well as ideas for playing with them. I both loved and hated this book. I loved it because it is great, and hated it because it isn’t perfect. Let me start with three places I didn’t like.

Consider a famous hat puzzle when there are hats of N colors. The sages are in a line, and hats are put on their heads. As usual, they are not allowed to give each other signals. Each of them has to announce their hat’s color, and they want to minimize the number of mistakes.

The big idea is to number the colors. The book suggests that the last sage in line calculates the total number of colors they see modulo N and announces the result to the rest. Then the others, starting from the end of the line, one by one, can calculate and name their hat colors. With this strategy, only the last sage in line might be mistaken.

This is a correct solution, but this is the first place I didn’t like. I prefer a different strategy, where everyone assumes that the total sum of the hat colors is 0 modulo N. In this case, every sage makes the same calculation: each sage sums up everything they see or hear and subtract the result from 0 modulo N. This solution is more elegant, since all the sages follow the same rule.

Then the book extends the same puzzle to an infinite number of sages. My second point of contention is that the authors think that, in this case, two sages might be mistaken. No. The answer is still the same, there is a strategy where not more than one sage is mistaken. See my blog post for the solution.

My third pet peeve happened when the authors introduced ballroom dancing in the puzzle on picture hanging. What is the connection between picture hanging and ballroom dancing? I’ll keep the book’s secret. My beef is with how the roles in ballroom dancing are described. Ballroom dancing is usually danced in pairs with asymmetric roles, which, in the past, were designated for males and females. Gender doesn’t play such a big role anymore; anyone can dance any role.

The authors are afraid to be politically incorrect by calling the dancers male and female. Instead, they say that the dancers dance male and female parts. Though formally, this choice of words might be politically correct, it still sounds awkward and draws attention to gender. If the authors ever talked to any person who has ever danced, they would have known that there is a much simpler way to describe dance roles. The dancers are divided into leaders and followers.

Did I ever tell you that reviewing my students’ writing is part of my job? So I am good at it and like critiquing other people’s writing. Now that my complaints are out, the issues with the book are actually minor.

The book is great. I even bought a second inflatable globe because of this book. The game, described in the book, is to rotate two globes randomly and then find a point on the globes in the same relative position towards the center. The game helped me teach my students that any movement of a sphere is a rotation.

My main goal in this post is to describe the only puzzle in the book that I haven’t seen before.

Puzzle. In a group of opera singers, there are two stars who are either friends or enemies. Surprisingly, only the host, who is not an opera singer, knows who the stars are and the nature of their relationship (the stars do not know that they are stars and whether or not they are friends). The group’s common goal is to identify the stars and to determine whether they are friends or enemies. To do so, they send a few of the singers to sing opera on a stage, which is divided into two halves: left and right. During the opera, the singers do not move between the halves. After the opera is over, the host classifies the opera. If there were no stars or only one star on stage, he classifies it as “neutral”. If both stars were on stage, the opera is a big success or a disaster. If both stars are friends and sing on the same half of the stage, or if they are enemies and sing on different halves, then the opera is a big success. Otherwise, it is a disaster.
What is the best strategy for a group of five singers to determine who are the stars and what is their relationship? What is the smallest number of operas they have to sing to guarantee that they can figure everything out?

It is weird that two people do not know whether they are friends. But sacrifices are needed for mathematics. I am excited that there is a nontrivial puzzle related to information theory, and it is ternary based. All other such puzzles I know are about weighing coins on a balance scale. I wrote too many papers about coin weighing. Now I can switch to opera singers with passionate relationships, secret from themselves.

Share: