arXiv Science⌕ Search

arXiv subjects

Jeffrey Shallit

Publications and source records attributed to Jeffrey Shallit.

At least 127 records · Page 7Linked to original sources

Rollercoasters and Caterpillars

A rollercoaster is a sequence of real numbers for which every maximal contiguous subsequence, that is increasing or decreasing, has length at least three. By translating this sequence to a set of points in the plane, a rollercoaster can be defined as a polygonal path for which every maximal sub-path, with positive- or negative-slope edges, has at least three points. Given a sequence of distinct real numbers, the rollercoaster problem asks for a maximum-length subsequence that is a rollercoaster. It was conjectured that every sequence of $n$ distinct real numbers contains a rollercoaster of length at least $\lceil n/2\rceil$ for $n>7$, while the best known lower bound is $Ω(n/\log n)$. In this paper we prove this conjecture. Our proof is constructive and implies a linear-time algorithm for computing a rollercoaster of this length. Extending the $O(n\log n)$-time algorithm for computing a longest increasing subsequence, we show how to compute a maximum-length rollercoaster within the same time bound. A maximum-length rollercoaster in a permutation of $\{1,\dots,n\}$ can be computed in $O(n \log \log n)$ time. The search for rollercoasters was motivated by orthogeodesic point-set embedding of caterpillars. A caterpillar is a tree such that deleting the leaves gives a path, called the spine. A top-view caterpillar is one of degree 4 such that the two leaves adjacent to each vertex lie on opposite sides of the spine. As an application of our result on rollercoasters, we are able to find a planar drawing of every $n$-node top-view caterpillar on every set of $\frac{25}{3}n$ points in the plane, such that each edge is an orthogonal path with one bend. This improves the previous best known upper bound on the number of required points, which is $O(n \log n)$. We also show that such a drawing can be obtained in linear time, provided that the points are given in sorted order.

cs.CG↗

Critical exponents of infinite balanced words

Over an alphabet of size 3 we construct an infinite balanced word with critical exponent 2+sqrt(2)/2. Over an alphabet of size 4 we construct an infinite balanced word with critical exponent (5+sqrt(5))/4. Over larger alphabets, we give some candidates for balanced words (found computationally) having small critical exponents. We also explore a method for proving these results using the automated theorem prover Walnut.

math.CO↗

Subword complexity and power avoidance

We begin a systematic study of the relations between subword complexity of infinite words and their power avoidance. Among other things, we show that -- the Thue-Morse word has the minimum possible subword complexity over all overlap-free binary words and all $(\frac 73)$-power-free binary words, but not over all $(\frac 73)^+$-power-free binary words; -- the twisted Thue-Morse word has the maximum possible subword complexity over all overlap-free binary words, but no word has the maximum subword complexity over all $(\frac 73)$-power-free binary words; -- if some word attains the minimum possible subword complexity over all square-free ternary words, then one such word is the ternary Thue word; -- the recently constructed 1-2-bonacci word has the minimum possible subword complexity over all \textit{symmetric} square-free ternary words.

cs.FL↗

Waring's Theorem for Binary Powers

A natural number is a binary $k$'th power if its binary representation consists of $k$ consecutive identical blocks. We prove an analogue of Waring's theorem for sums of binary $k$'th powers. More precisely, we show that for each integer $k \geq 2$, there exists a positive integer $W(k)$ such that every sufficiently large multiple of $E_k := \gcd(2^k - 1, k)$ is the sum of at most $W(k)$ binary $k$'th powers. (The hypothesis of being a multiple of $E_k$ cannot be omitted, since we show that the $\gcd$ of the binary $k$'th powers is $E_k$.) Also, we explain how our results can be extended to arbitrary integer bases $b > 2$.

math.NT↗

A Taxonomy of Morphic Sequences

In this note we classify sequences according to whether they are morphic, pure morphic, uniform morphic, pure uniform morphic, primitive morphic, or pure primitive morphic, and for each possibility we either give an example or prove that no example is possible.

cs.FL↗

When is an automatic set an additive basis?

We characterize those $k$-automatic sets $S$ of natural numbers that form an additive basis for the natural numbers, and we show that this characterization is effective. In addition, we give an algorithm to determine the smallest $j$ such that $S$ forms an additive basis of order $j$, if it exists.

math.NT↗

More Infinite Products: Thue-Morse and the Gamma function

Letting $(t_n)$ denote the Thue-Morse sequence with values $0, 1$, we note that the Woods-Robbins product $$ \prod_{n \geq 0} \left(\frac{2n+1}{2n+2}\right)^{(-1)^{t_n}} = 2^{-1/2} $$ involves a rational function in $n$ and the $\pm 1$ Thue-Morse sequence $((-1)^{t_n})_{n \geq 0}$. The purpose of this paper is twofold. On the one hand, we try to find other rational functions for which similar infinite products involving the $\pm 1$ Thue-Morse sequence have an expression in terms of known constants. On the other hand, we also try to find (possibly different) rational functions $R$ for which the infinite product $\prod R(n)^{t_n}$ also has an expression in terms of known constants.

math.NT↗

Sums of Palindromes: an Approach via Automata

Recently, Cilleruelo, Luca, & Baxter proved, for all bases b >= 5, that every natural number is the sum of at most 3 natural numbers whose base-b representation is a palindrome. However, the cases b = 2, 3, 4 were left unresolved. We prove, using a decision procedure based on automata, that every natural number is the sum of at most 4 natural numbers whose base-2 representation is a palindrome. Here the constant 4 is optimal. We obtain similar results for bases 3 and 4, thus completely resolving the problem. We consider some other variations on this problem, and prove similar results. We argue that heavily case-based proofs are a good signal that a decision procedure may help to automate the proof.

cs.FL↗

The Generalized Nagell-Ljunggren Problem: Powers with Repetitive Representations

We consider a natural generalization of the Nagell-Ljunggren equation to the case where the qth power of an integer y, for q >= 2, has a base-b representation that consists of a length-l block of digits repeated n times, where n >= 2. Assuming the abc conjecture of Masser and Oesterlé, we completely characterize those triples (q, n, l) for which there are infinitely many solutions b. In all cases predicted by the abc conjecture, we are able (without any assumptions) to prove there are indeed infinitely many solutions.

math.NT↗

Undecidability and Finite Automata

Using a novel rewriting problem, we show that several natural decision problems about finite automata are undecidable (i.e., recursively unsolvable). In contrast, we also prove three related problems are decidable. We apply one result to prove the undecidability of a related problem about k-automatic sets of rational numbers.

cs.FL↗

Abelian-Square-Rich Words

An abelian square is the concatenation of two words that are anagrams of one another. A word of length $n$ can contain at most $Θ(n^2)$ distinct factors, and there exist words of length $n$ containing $Θ(n^2)$ distinct abelian-square factors, that is, distinct factors that are abelian squares. This motivates us to study infinite words such that the number of distinct abelian-square factors of length $n$ grows quadratically with $n$. More precisely, we say that an infinite word $w$ is {\it abelian-square-rich} if, for every $n$, every factor of $w$ of length $n$ contains, on average, a number of distinct abelian-square factors that is quadratic in $n$; and {\it uniformly abelian-square-rich} if every factor of $w$ contains a number of distinct abelian-square factors that is proportional to the square of its length. Of course, if a word is uniformly abelian-square-rich, then it is abelian-square-rich, but we show that the converse is not true in general. We prove that the Thue-Morse word is uniformly abelian-square-rich and that the function counting the number of distinct abelian-square factors of length $2n$ of the Thue-Morse word is $2$-regular. As for Sturmian words, we prove that a Sturmian word $s_α$ of angle $α$ is uniformly abelian-square-rich if and only if the irrational $α$ has bounded partial quotients, that is, if and only if $s_α$ has bounded exponent.

cs.DM↗

A Class of Exponential Sequences with Shift-Invariant Discriminators

The discriminator of an integer sequence s = (s(i))_{i>=0}, introduced by Arnold, Benkoski, and McCabe in 1985, is the function D_s(n) that sends n to the least integer m such that the numbers s(0), s(1), ..., s(n-1) are pairwise incongruent modulo m. In this note we present a class of exponential sequences that have the special property that their discriminators are shift-invariant, i.e., that the discriminator of the sequence is the same even if the sequence is shifted by any positive constant.

math.NT↗

Periodicity in Rectangular Arrays

We discuss several two-dimensional generalizations of the familiar Lyndon-Schutzenberger periodicity theorem for words. We consider the notion of primitive array (as one that cannot be expressed as the repetition of smaller arrays). We count the number of m x n arrays that are primitive. Finally, we show that one can test primitivity and compute the primitive root of an array in linear time.

cs.DM↗

Hankel Matrices for the Period-Doubling Sequence

We give an explicit evaluation, in terms of products of Jacobsthal numbers, of the Hankel determinants of order a power of two for the period-doubling sequence. We also explicitly give the eigenvalues and eigenvectors of the corresponding Hankel matrices. Similar considerations give the Hankel determinants for other orders.

math.CO↗

Length of the continued logarithm algorithm on rational inputs

The continued logarithm algorithm was introduced by Gosper around 1978, and recently studied by Borwein, Calkin, Lindstrom, and Mattingly. In this note I show that the continued logarithm algorithm terminates in at most 2 log_2 p + O(1) steps on input a rational number p/q >= 1. Furthermore, this bound is tight, up to an additive constant.

math.NT↗

Discriminators and k-Regular Sequences

The discriminator of an integer sequence s = (s(i))_{i >=0}, introduced by Arnold, Benkoski, and McCabe in 1985, is the map D_s(n) that sends n >= 1 to the least positive integer m such that the n numbers s(0), s(1), ..., s(n-1) are pairwise incongruent modulo m. In this note we consider the discriminators of a certain class of sequences, the k-regular sequences. We compute the discriminators of two such sequences, the so-called "evil" and "odious" numbers, and show they are 2-regular. We also give an example of a k-regular sequence whose discriminator is not k-regular. Finally, we examine sequences that are their own discriminators, and count the number of length-$n$ finite sequences with this property.

cs.DM↗