Papers by Jeffrey Shallit
126 paper(s) by this author
· All BibTeX
Beatty Sequences for a Quadratic Irrational: Decidability and Applications
Let $α$ and $β$ belong to the same quadratic field. We show that the inhomogeneous Beatty sequence $(\lfloor n α+ β\rfloor)_{n \geq 1}$ is synchronized, in the sense that there is a finite automaton that takes as input the Ostrowski representations of $n$ and $y$ in parallel, and accepts if and only if $y = \lfloor n α+ β\rfloor$. Since it is already known that the addition relation is computable for Ostrowski representations based on a quadratic number, a consequence is a new and rather simple proof that the first-order logical theory of these sequences with addition is decidable. The decision procedure is easily implemented in the free software Walnut.
As an application, we show that for each $r \geq 1$ it is decidable whether the set $\{ \lfloor n α+ β\rfloor \, : \, n \geq 1 \}$ forms an additive basis (or asymptotic additive basis) of order $r$. Using our techniques, we also solve some open problems of Reble and Kimberling, and give an explicit characterization of a sequence of Hildebrand et al.
Strongly k-recursive sequences
Drawing inspiration from a recent paper of Heuberger, Krenn, and Lipnik, we define the class of strongly k-recursive sequences. We show that every k-automatic sequence is strongly $k$-recursive, therefore k-recursive, and discuss that the converse is not true.
We also show that the class of strongly k-recursive sequences is a proper subclass of the class of k-regular sequences, and we present some explicit examples. We then extend the proof techniques to answer the same question for the class of k-recursive sequences.
Combinatorics on words and generating Dirichlet series of automatic sequences
Generating series are crucial in enumerative combinatorics, analytic combinatorics, and combinatorics on words. Though it might seem at first view that generating Dirichlet series are less used in these fields than ordinary and exponential generating series, there are many notable papers where they play a fundamental role, as can be seen in particular in the work of Flajolet and several of his co-authors. In this paper, we study Dirichlet series of integers with missing digits or blocks of digits in some integer base $b$; i.e., where the summation ranges over the integers whose expansions form some language strictly included in the set of all words over the alphabet $\{0, 1, \dots, b-1\}$ that do not begin with a $0$. We show how to unify and extend results proved by Nathanson in 2021 and by Köhler and Spilker in 2009. En route, we encounter several sequences from Sloane's On-Line Encyclopedia of Integer Sequences, as well as some famous $b$-automatic sequences or $b$-regular sequences. We also consider a specific sequence that is not $b$-regular.
Some Fibonacci-Related Sequences
Published
• View Publication
• BIB
We discuss an interesting sequence defined recursively; namely, sequence A105774 from the On-Line Encyclopedia of Integer Sequences, and study some of its properties. Our main tools are Fibonacci representation, finite automata, and the Walnut theorem-prover. We also prove two new results about synchronized sequences.
Repetition factorization of automatic sequences
Following Inoue et al., we define a word to be a repetition if it is a (fractional) power of exponent at least 2. A word has a repetition factorization if it is the product of repetitions. We study repetition factorizations in several (generalized) automatic sequences, including the infinite Fibonacci word, the Thue-Morse word, paperfolding words, and the Rudin-Shapiro sequence.
Power-free Complementary Binary Morphisms
We revisit the topic of power-free morphisms, focusing on the properties of the class of complementary morphisms. Such morphisms are defined over a $2$-letter alphabet, and map the letters 0 and 1 to complementary words. We prove that every prefix of the famous Thue-Morse word $\mathbf{t}$ gives a complementary morphism that is $3^+$-free and hence $α$-free for every real number $α>3$. We also describe, using a 4-state binary finite automaton, the lengths of all prefixes of $\mathbf{t}$ that give cubefree complementary morphisms. Next, we show that $3$-free (cubefree) complementary morphisms of length $k$ exist for all $k\not\in \{3,6\}$. Moreover, if $k$ is not of the form $3\cdot2^n$, then the images of letters can be chosen to be factors of $\mathbf{t}$. Finally, we observe that each cubefree complementary morphism is also $α$-free for some $α<3$; in contrast, no binary morphism that maps each letter to a word of length 3 (resp., a word of length 6) is $α$-free for any $α<3$.
In addition to more traditional techniques of combinatorics on words, we also rely on the Walnut theorem-prover. Its use and limitations are discussed.
Proof of Irvine's Conjecture via Mechanized Guessing
We prove a recent conjecture of Sean A. Irvine about a nonlinear recurrence, using mechanized guessing and verification. The theorem-prover Walnut plays a large role in the proof.
Proving properties of some greedily-defined integer recurrences via automata theory
Venkatachala on the one hand, and Avdispahić & Zejnulahi on the other, both studiied integer sequences with an unusual sum property defined in a greedy way, and proved many results about them. However, their proofs were rather lengthy and required numerous cases. In this paper, I provide a different approach, via finite automata, that can prove the same results (and more) in a simple, unified way. Instead of case analysis, we use a decision procedure implemented in the free software Walnut. Using these ideas, we can prove a conjecture of Quet and find connections between Quet's sequence and the "married" functions of Hofstadter.
Transduction of Automatic Sequences and Applications
We consider the implementation of the transduction of automatic sequences, and their generalizations, in the Walnut software for solving decision problems in combinatorics on words. We provide a number of applications, including (a) representations of n! as a sum of three squares (b) overlap-free Dyck words and (c) sums of Fibonacci representations. We also prove results about iterated running sums of the Thue-Morse sequence.
Smallest and Largest Block Palindrome Factorizations
A \emph{palindrome} is a word that reads the same forwards and backwards. A \emph{block palindrome factorization} (or \emph{BP-factorization}) is a factorization of a word into blocks that becomes palindrome if each identical block is replaced by a distinct symbol. We call the number of blocks in a BP-factorization the \emph{width} of the BP-factorization. The \emph{largest BP-factorization} of a word $w$ is the BP-factorization of $w$ with the maximum width. We study words with certain BP-factorizations. First, we give a recurrence for the number of length-$n$ words with largest BP-factorization of width $t$. Second, we show that the expected width of the largest BP-factorization of a word tends to a constant. Third, we give some results on another extremal variation of BP-factorization, the \emph{smallest BP-factorization}. A \emph{border} of a word $w$ is a non-empty word that is both a proper prefix and suffix of $w$. Finally, we conclude by showing a connection between words with a unique border and words whose smallest and largest BP-factorizations coincide.
Prefixes of the Fibonacci word
Mignosi, Restivo, and Salemi (1998) proved that for all $ε> 0$ there exists an integer $N$ such that all prefixes of the Fibonacci word of length $\geq N$ contain a suffix of exponent $α^2-ε$, where $α= (1+\sqrt{5})/2$ is the golden ratio. In this note we show how to prove an explicit version of this theorem with tools from automata theory and logic. Along the way we gain a better understanding of the repetitive structure of the Fibonacci word.
Rudin-Shapiro Sums Via Automata Theory and Logic
We show how to obtain, via a unified framework provided by logic and automata theory, many classical results of Brillhart and Morton on Rudin-Shapiro sums. The techniques also facilitate easy proofs for new results.
Proof of a conjecture of Krawchuk and Rampersad
We prove a 2018 conjecture of Krawchuk and Rampersad on the extremal behavior of $c(n)$, where $c(n)$ counts the number of length-$n$ factors of the Thue-Morse word $\mathbf{t}$, up to cyclic rotation.
Dyck Words, Pattern Avoidance, and Automatic Sequences
Published in Communications in Mathematics, Volume 33 (2025), Issue 2 (Special issue: Numeration, Liège 2023, dedicated to the 75th birthday of professor Christiane Frougny) (August 2, 2024) cm:12695
• View Publication
• BIB
We study various aspects of Dyck words appearing in binary sequences, where $0$ is treated as a left parenthesis and $1$ as a right parenthesis. We show that binary words that are $7/3$-power-free have bounded nesting level, but this no longer holds for larger repetition exponents. We give an explicit characterization of the factors of the Thue-Morse word that are Dyck, and show how to count them. We also prove tight upper and lower bounds on $f(n)$, the number of Dyck factors of Thue-Morse of length $2n$.
Counterexamples to a Conjecture of Dombi in Additive Number Theory
Published
• View Publication
• BIB
We disprove a 2002 conjecture of Dombi from additive number theory. More precisely, we find examples of sets $A \subset \mathbb{N}$ with the property that $\mathbb{N} \setminus A$ is infinite, but the sequence $n \rightarrow |\{ (a,b,c) \, : \, n=a+b+c \text{ and } a,b,c \in A \}|$, counting the number of $3$-compositions using elements of $A$ only, is strictly increasing.
Some Tribonacci Conjectures
Published
• View Publication
• BIB
In a recent talk of Robbert Fokkink, some conjectures related to the infinite Tribonacci word were stated by the speaker and the audience. In this note we show how to prove (or disprove) the claims easily in a "purely mechanical" fashion, using the Walnut theorem-prover.
Complement Avoidance in Binary Words
Published
• View Publication
• BIB
The complement $\overline{x}$ of a binary word $x$ is obtained by changing each $0$ in $x$ to $1$ and vice versa. We study infinite binary words $\bf w$ that avoid sufficiently large complementary factors; that is, if $x$ is a factor of $\bf w$ then $\overline{x}$ is not a factor of $\bf w$. In particular, we classify such words according to their critical exponents.
Antisquares and Critical Exponents
Published in Discrete Mathematics & Theoretical Computer Science, vol. 25:2, Combinatorics (September 6, 2023) dmtcs:10063
• View Publication
• BIB
The (bitwise) complement $\overline{x}$ of a binary word $x$ is obtained by changing each $0$ in $x$ to $1$ and vice versa. An $\textit{antisquare}$ is a nonempty word of the form $x\, \overline{x}$. In this paper, we study infinite binary words that do not contain arbitrarily large antisquares. For example, we show that the repetition threshold for the language of infinite binary words containing exactly two distinct antisquares is $(5+\sqrt{5})/2$. We also study repetition thresholds for related classes, where "two" in the previous sentence is replaced by a larger number.
We say a binary word is $\textit{good}$ if the only antisquares it contains are $01$ and $10$. We characterize the minimal antisquares, that is, those words that are antisquares but all proper factors are good. We determine the growth rate of the number of good words of length $n$ and determine the repetition threshold between polynomial and exponential growth for the number of good words.
Automatic Sequences in Negative Bases and Proofs of Some Conjectures of Shevelev
Published
• View Publication
• BIB
We discuss the use of negative bases in automatic sequences. Recently the theorem-prover Walnut has been extended to allow the use of base (-k) to express variables, thus permitting quantification over Z instead of N. This enables us to prove results about two-sided (bi-infinite) automatic sequences. We first explain the theory behind negative bases in Walnut. Next, we use this new version of Walnut to give a very simple proof of a strengthened version of a theorem of Shevelev. We use our ideas to resolve two open problems of Shevelev from 2017. We also reprove a 2000 result of Shur involving bi-infinite binary words.
Pseudoperiodic Words and a Question of Shevelev
Published in Discrete Mathematics & Theoretical Computer Science, vol. 25:2, Automata, Logic and Semantics (October 16, 2023) dmtcs:9919
• View Publication
• BIB
We generalize the familiar notion of periodicity in sequences to a new kind of pseudoperiodicity, and we prove some basic results about it. We revisit the results of a 2012 paper of Shevelev and reprove his results in a simpler and more unified manner, and provide a complete answer to one of his previously unresolved questions. We consider finding words with specific pseudoperiod and having the smallest possible critical exponent. Finally, we consider the problem of determining whether a finite word is pseudoperiodic of a given size, and show that it is NP-complete.