← Latest papers
🔢 mathematics

Balanced Fibonacci word rectangles, and beyond

This paper demonstrates that the balance properties of rectangular matrices formed from Fibonacci words can be decided by a finite automaton, extends this result to Sturmian words associated with quadratic irrationals, and investigates analogous properties for Tribonacci and Thue-Morse words.

Original authors: Jeffrey Shallit, Ingrid Vukusic

Published 2026-03-31
📖 5 min read🧠 Deep dive

Original authors: Jeffrey Shallit, Ingrid Vukusic

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have an infinite strip of paper covered in a pattern of black and white dots. This pattern isn't random; it follows a very specific, mathematical rhythm known as the Fibonacci word. It looks something like this: 01001010... (where 0 is white and 1 is black).

Now, imagine you take a pair of scissors and cut out a rectangular window from this strip. You can slide this window along the strip, and every time you move it, you see a slightly different arrangement of dots inside your window.

The Big Question:
If you keep sliding this window, will the number of black dots inside it stay roughly the same? Or will it swing wildly, sometimes having almost all black dots and other times almost all white dots?

In math terms, we call a rectangle "balanced" if the number of black dots in any window of that size never varies by more than a tiny amount (specifically, if the difference between the "most black" window and the "least black" window is at most 1 or 2).

This paper by Jeffrey Shallit and Ingrid Vukusic is like a detective story. They are trying to answer: "For which sizes of windows (say, 4x5 or 7x12) is the pattern perfectly balanced?"

Here is the breakdown of their discovery, explained with everyday analogies:

1. The "Magic Machine" (Finite Automata)

The authors didn't just guess the answer. They built a "magic machine" (in computer science, called a finite automaton).

Think of this machine as a very strict bouncer at a club.

  • You hand the bouncer two numbers: the width (mm) and the height (nn) of your window.
  • The bouncer checks a secret rulebook (which is actually a complex flowchart of states).
  • If the window size is "balanced," the bouncer lets you in (says "Yes").
  • If the window size is "unbalanced," the bouncer kicks you out (says "No").

The amazing part is that for the Fibonacci word, this bouncer is surprisingly simple. It doesn't need to remember the whole infinite strip; it just needs to look at the numbers mm and nn in a special code (called Zeckendorf representation, which is like counting using only Fibonacci numbers) and make a quick decision.

2. The "Staircase" Analogy (Why it works)

Why is the Fibonacci word special? Imagine the dots are steps on a staircase.

  • If you take a step up, you go from 0 to 1.
  • If you take a step down, you go from 1 to 0.
  • The Fibonacci word is built so that you never take two steps up in a row, and you never take two steps down in a row. It's a very gentle, rhythmic walk.

The authors proved that if you look at the "total height" (the sum of dots) of any rectangular window, the difference between the highest window and the lowest window is tiny. They found a specific rule: If the larger of your two numbers (width or height) is a Fibonacci number (like 2, 3, 5, 8, 13...), the window is guaranteed to be balanced.

But they went further! They found other sizes that are also balanced, like a 4x3 window. They used their "magic machine" to list all the winning sizes.

3. The "Tribonacci" and "Thue-Morse" Cousins

The authors didn't stop at the Fibonacci word. They looked at two other famous patterns:

  • The Tribonacci Word: This is like the Fibonacci word but with three colors (0, 1, and 2) instead of two. It's more chaotic. They found that for this pattern, if your window is too tall (3 or more rows), it's impossible to be perfectly balanced. It's like trying to stack a wobbly tower; eventually, it tips over.
  • The Thue-Morse Word: This is a pattern that is famous for never repeating itself. Here, the math is a bit different. The authors found that the "imbalance" (the difference between the most and least dots) is always very small (never more than 4), regardless of the window size. It's like a very well-mixed salad; no matter how big a scoop you take, the ratio of ingredients stays almost the same.

4. The "Computer Brain" (Walnut)

How did they find these rules? They didn't do it with a pencil and paper. They used a free software tool called Walnut.

Think of Walnut as a super-powered calculator that speaks "logic." You can tell it: "Check every possible window size. If you find a window where the dot count swings too wildly, mark it as 'bad'."
The computer then builds the "bouncer" (the automaton) automatically. The authors had to wait for the computer to crunch the numbers for the Thue-Morse word, which took over 3 hours and used a massive amount of memory (100 gigabytes of RAM)—like filling a small warehouse with hard drives just to solve one puzzle!

The Takeaway

This paper is a triumph of automated reasoning. It shows that even for infinite, complex patterns, we can use computers to find simple, finite rules that govern them.

  • For the Fibonacci word: There is a simple checklist (the automaton) to tell you if any rectangle size is fair and balanced.
  • For other words: We can use the same tools to see if they are fair, and if not, exactly how unfair they get.

It turns a seemingly endless, chaotic pattern into a solvable puzzle with a clear "Yes" or "No" answer, thanks to the power of logic and computers.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →