Complexity of Linear Subsequences of kk-Automatic Sequences

This paper investigates the state complexity of automata recognizing relations and operations on kk-automatic sequences, establishing a link between the subword complexity of interior sequences and the state complexity of their linear subsequences while resolving a recent question by Zantema and Bosma regarding most-significant-digit-first inputs.

Delaram Moradi, Narad Rampersad, Jeffrey Shallit

Published Tue, 10 Ma
📖 6 min read🧠 Deep dive

Imagine you have a giant, infinite tape of numbers, like a never-ending roll of toilet paper. On this tape, there's a pattern of 0s and 1s (or other symbols) that repeats in a very specific, predictable way. In computer science, we call these Automatic Sequences. They are like a song that never ends but follows a strict set of rules.

Now, imagine you have a tiny, simple robot (called an Automaton) that can read this tape. The robot has a limited memory (a few "states" or mental modes). Its job is to look at a number written on the tape (like the 43rd number) and tell you what symbol is there. The State Complexity is just a fancy way of asking: "How big does the robot's brain need to be to do this job?"

This paper is a deep dive into what happens when we mess with these sequences. The authors, Delaram Moradi, Narad Rampersad, and Jeffrey Shallit, ask three main questions:

  1. The "Addition" Problem: If we want the robot to check if A+B=CA + B = C, how big does its brain need to be?
  2. The "Skip" Problem: If we only look at every 5th number on the tape (a "linear subsequence"), does the robot need a bigger brain?
  3. The "Speed" Problem: If we use a standard software tool (like a calculator for logic) to build these robots, how long does it take, and how big do the intermediate robots get before we finish?

Here is the breakdown of their findings using some creative analogies.

1. The Robot's Brain Size (State Complexity)

Think of the robot's memory states as rooms in a hotel.

  • Simple Math: If the robot just needs to check if two numbers add up to a third (like checking a receipt), it only needs 2 rooms (states), no matter how big the numbers are. It's like a simple "carry the one" mechanic.
  • Adding a Constant: If the robot needs to check if x+5=yx + 5 = y, it needs a slightly bigger hotel. The size of the hotel grows with the logarithm of the number 5. Think of it like a ladder: to reach the 5th rung, you don't need a skyscraper; you just need a few extra steps.
  • The "Skip" Surprise: This is the paper's biggest "Aha!" moment.
    • Imagine you have a sequence of numbers. If you decide to only look at every 3rd number (the 3rd, 6th, 9th...), you might think the robot just needs to count to 3.
    • The Twist: The authors found that the size of the robot's brain for this "skipped" sequence is directly tied to the complexity of the patterns inside the original sequence.
    • The Analogy: Imagine the original sequence is a long, complex tapestry. If you look at the whole thing, it's messy. But if you only look at every 3rd thread, you are essentially looking at a specific "slice" of the tapestry. The authors proved that the size of the robot needed to read this slice is equal to the number of unique patterns of a certain length found in the original tapestry.
    • Why it matters: They solved a puzzle left open by other researchers (Zantema and Bosma) about how to predict this size. They showed that for certain sequences (like the famous Thue-Morse sequence, which is a pattern of 0s and 1s that avoids repeating itself too much), the robot's brain size grows in a very specific, predictable way based on how "jumbled" the patterns are.

2. Reading Direction: Left-to-Right vs. Right-to-Left

The paper also discusses how the robot reads the numbers.

  • LSD-First (Least Significant Digit first): Reading a number like 101 from right to left (1, then 0, then 1). This is like adding numbers on paper; it's easy for a robot to handle carries.
  • MSD-First (Most Significant Digit first): Reading from left to right (1, then 0, then 1). This is how we usually read.
  • The Difference: The authors explain that for simple math (addition), both directions are easy. But for skipping numbers in a sequence, reading left-to-right (MSD) is much harder for the robot. It's like trying to guess the end of a story by only reading the first few words of every paragraph; you need a much bigger memory to keep track of the context.

3. The "Walnut" Software and Construction Time

The authors also looked at how long it takes to build these robots using a popular software tool called Walnut. Walnut uses a type of logic (Büchi arithmetic) to automatically generate these robots.

  • The Metaphor: Imagine you want to build a custom robot. You have a blueprint (the math formula).
    • The Old Way: You might try to build the robot directly, which is efficient.
    • The Walnut Way: You ask a general-purpose construction crew to build it for you. They use a very flexible, powerful method that works for any math problem, not just this specific one.
  • The Result: The authors analyzed how long this takes. They found that while the final robot might be small and efficient, the construction process creates some very large, temporary "intermediate" robots before it shrinks them down to the final size.
  • The Cost: The time it takes to build these robots grows based on the size of the numbers involved. For example, if you are skipping every nn numbers, the time to build the robot grows roughly with n×(log of n)2n \times (\text{log of } n)^2. It's not instant, but it's manageable for computers.

Summary of the "Big Picture"

This paper is like a manual for robot architects working with infinite number patterns.

  1. We now know exactly how big the robot needs to be when we skip numbers in a pattern, and it turns out the size depends on how many unique "chunks" of the pattern exist.
  2. We solved a mystery about whether reading numbers from left-to-right makes the robot's brain explode in size (it does, but in a predictable way).
  3. We measured the construction time, showing that while modern software tools are powerful, they can be a bit "bloated" during the building phase, creating temporary giants before settling into the final, efficient design.

In short, the authors took a complex, abstract problem in computer science and mapped out the exact "cost" (in memory and time) of manipulating these infinite digital patterns, providing a clear roadmap for anyone trying to build or analyze these systems.