String Attractors for Automatic Sequences
Luke Schaeffer, Jeffrey Shallit
TL;DR
We prove the decidability of whether all prefixes of an automatic sequence admit a string attractor of size at most $c$ and show how to construct automata that output minimal attractors for prefix lengths. The paper analyzes key automatic sequences, establishing that the prefix attractor size for period-doubling, Thue-Morse, and Tribonacci words is either constant or follows a structured regime, with explicit attractors provided. It develops general upper bounds based on the appearance constant $\mathbf{A}_{\mathbf{w}}$ and recurrence constant $\mathbf{R}_{\mathbf{w}}$, showing $\gamma_{\mathbf{w}}(n)=O(\mathbf{A}_{\mathbf{w}}\log n)$ and, under linear recurrence, possible $O(1)$ behavior; it also proves a sharp dichotomy $\Theta(1)$ vs $\Theta(\log n)$ for $k$-automatic sequences and introduces greedy attractors with $O(\mathbf{A}_{\mathbf{w}}\log n)$ guarantees. The work combines FO logic over $\mathbb{N}$, automata-theoretic methods (notably Walnut), and constructive proofs to illuminate the structure of string attractors in automatic words and their spans, with implications for concise representations and combinatorial analysis of these sequences.
Abstract
We show that it is decidable, given an automatic sequence $\bf s$ and a constant $c$, whether all prefixes of $\bf s$ have a string attractor of size $\leq c$. Using a decision procedure based on this result, we show that all prefixes of the period-doubling sequence of length $\geq 2$ have a string attractor of size $2$. We also prove analogous results for other sequences, including the Thue-Morse sequence and the Tribonacci sequence. We also provide general upper and lower bounds on string attractor size for different kinds of sequences. For example, if $\bf s$ has a finite appearance constant, then there is a string attractor for ${\bf s}[0..n-1]$ of size $O(\log n)$. If further $\bf s$ is linearly recurrent, then there is a string attractor for ${\bf s}[0..n-1]$ of size $O(1)$. For automatic sequences, the size of the smallest string attractor for ${\bf s}[0..n-1]$ is either $Θ(1)$ or $Θ(\log n)$, and it is decidable which case occurs. Finally, we close with some remarks about greedy string attractors.
