We prove that a random word of length $n$ over a $k$-ary fixed alphabet contains, on expectation, $Θ(\sqrt{n})$ distinct palindromic factors. We study this number of factors, $E(n,k)$, in detail, showing that the limit $\lim_{n\to\infty}E(n,k)/\sqrt{n}$ does not exist for any $k\ge2$, $\liminf_{n\to\infty}E(n,k)/\sqrt{n}=Θ(1)$, and $\limsup_{n\to\infty}E(n,k)/\sqrt{n}=Θ(\sqrt{k})$. Such a complicated behaviour stems from the asymmetry between the palindromes of even and odd length. We show that a similar, but much simpler, result on the expected number of squares in random words holds. We also provide some experimental data on the number of palindromic factors in random words.
Fraenkel and Simpson showed that the number of distinct squares in a word of length n is bounded from above by 2n, since at most two distinct squares have their rightmost, or last, occurrence begin at each position. Improvements by Ilie to $2n-Θ(\log n)$ and by Deza et al. to 11n/6 rely on the study of combinatorics of FS-double-squares, when the maximum number of two last occurrences of squares begin. In this paper, we first study how to maximize runs of FS-double-squares in the prefix of a word. We show that for a given positive integer m, the minimum length of a word beginning with m FS-dou…
A closed word (a.k.a. periodic-like word or complete first return) is a word whose longest border does not have internal occurrences, or, equivalently, whose longest repeated prefix is not right special. We investigate the structure of closed factors of words. We show that a word of length $n$ contains at least $n+1$ distinct closed factors, and characterize those words having exactly $n+1$ closed factors. Furthermore, we show that a word of length $n$ can contain $Θ(n^{2})$ many distinct closed factors.
We find generating functions for the number of words avoiding certain patterns or sets of patterns on at most 2 distinct letters and determine which of them are equally avoided. We also find the exact number of words avoiding certain patterns and provide bijective proofs for the resulting formulas.
A power is a word of the form $\underbrace{uu...u}_{k \; \text{times}}$, where $u$ is a word and $k$ is a positive integer and a square is a word of the form $uu$. Fraenkel and Simpson conjectured in 1998 that the number of distinct squares in a word is bounded by the length of the word. This conjecture was proven recently by Brlek and Li. Besides, there exists a stronger upper bound for binary words conjectured by Jonoska, Manea and Seki stating that for a word of length $n$ over the alphabet $\left\{a, b\right\}$, if we let $k$ be the least of the number of a's and the number of b's and $k \…
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 o…
We construct infinite cubefree binary words containing exponentially many distinct squares of length n. We also show that for every positive integer n, there is a cubefree binary square of length 2n.
A Tighter Upper Bound for the Number of Distinct Squares in Circular Words
Hangzhou International Innovation Institute of Beihang University(北京航空航天大学杭州国际创新学院);LMIB-School of Mathematical Sciences, Beihang University(北京航空航天大学数学科学学院)
We are interested in the maximal number of distinct squares in a word. This problem was introduced by Fraenkel and Simpson, who presented a bound of 2n for a word of length n, and conjectured that the bound was less than n. Being that the problem is on repetitions, their solution relies on Fine and Wilf's Periodicity lemma. Ilie then refined their result and presented a bound of 2n-O(log n). Lam used an induction to get a bound of 95n/48. Deza, Franek and Thierry achieved a bound of 11n/6 through a combinatorial approach. Using the properties of the core of the interrupt, presented by Thierry,…
In this paper, we determine the maximum number of distinct Lyndon factors that a word of length $n$ can contain. We also derive formulas for the expected total number of Lyndon factors in a word of length $n$ on an alphabet of size $σ$, as well as the expected number of distinct Lyndon factors in such a word. The minimum number of distinct Lyndon factors in a word of length $n$ is $1$ and the minimum total number is $n$, with both bounds being achieved by $x^n$ where $x$ is a letter. A more interesting question to ask is what is the minimum number of distinct Lyndon factors in a Lyndon word of…
A {\em square} is a word of the form $uu$. In this paper we prove that for a given finite word $w$, the number of distinct square factors of $w$ is bounded by $|w|-|\Alphabet(w)|+1$, where $|w|$ denotes the length of $w$ and $|\Alphabet(w)|$ denotes the number of distinct letters in $w$. This result answers a conjecture of Fraenkel and Simpson stated in 1998.
Motivated by a conjecture of Frid, Puzynina, and Zamboni, we investigate infinite words with the property that for infinitely many n, every length-n factor is a product of two palindromes. We show that every Sturmian word has this property, but this does not characterize the class of Sturmian words. We also show that the Thue-Morse word does not have this property. We investigate finite words with the maximal number of distinct palindrome pair factors and characterize the binary words that are not palindrome pairs but have the property that every proper factor is a palindrome pair.
A word is called closed if it has a prefix which is also its suffix and there is no internal occurrences of this prefix in the word. In this paper we study words that are rich in closed factors, i.e., which contain the maximal possible number of distinct closed factors. As the main result, we show that for finite words the asymptotics of the maximal number of distinct closed factors in a word of length $n$ is $\frac{n^2}{6}$. For infinite words, we show there exist words such that each their factor of length $n$ contains a quadratic number of distinct closed factors, with uniformly bounded con…
The initial non-repetitive complexity function of an infinite word x (first defined by Moothathu) is the function of n that counts the number of distinct factors of length n that appear at the beginning of x prior to the first repetition of a length-n factor. We examine general properties of the initial non-repetitive complexity function, as well as obtain formulas for the initial non-repetitive complexity of the Thue-Morse word, the Fibonacci word and the Tribonacci word.
Trapezoidal words are finite words having at most n+1 distinct factors of length n, for every n>=0. They encompass finite Sturmian words. We distinguish trapezoidal words into two disjoint subsets: open and closed trapezoidal words. A trapezoidal word is closed if its longest repeated prefix has exactly two occurrences in the word, the second one being a suffix of the word. Otherwise it is open. We show that open trapezoidal words are all primitive and that closed trapezoidal words are all Sturmian. We then show that trapezoidal palindromes are closed (and therefore Sturmian). This allows us t…
A square is a concatenation of two identical words, and a word $w$ is said to have a square $yy$ if $w$ can be written as $xyyz$ for some words $x$ and $z$. It is known that the ratio of the number of distinct squares in a word to its length is less than two and any location of a word could begin with at most two rightmost distinct squares. A square whose first location starts with the last occurrence of two distinct squares is an FS-double square. We explore and identify the conditions to generate a sequence of locations in a word that starts with FS-double squares. We first find the structur…
An abelian square is the concatenation of two words that are anagrams of one another. A word of length $n$ can contain $Θ(n^2)$ distinct factors that are abelian squares. We study infinite words such that the number of abelian square factors of length $n$ grows quadratically with $n$.
For a given language $L$, we study the languages $X$ such that for all distinct words $u, v \in L$, there exists a word $x \in X$ that appears a different number of times as a factor in $u$ and in $v$. In particular, we are interested in the following question: For which languages $L$ does there exist a finite language $X$ satisfying the above condition? We answer this question for all regular languages and for all sets of factors of infinite words.
A word w is rich if it has |w|+1 many distinct palindromic factors, including the empty word. A word is square-free if it does not have a factor uu, where u is a non-empty word. Pelantová and Starosta (Discrete Math. 313 (2013)) proved that every infinite rich word contains a square. We will give another proof for that result. Pelantová and Starosta denoted by r(n) the length of a longest rich square-free word on an alphabet of size n. The exact value of r(n) was left as an open question. We will give an upper and a lower bound for r(n), and make a conjecture that our lower bound is exact. We …
The subword complexity of a word $w$ over a finite alphabet $\mathcal{A}$ is a function that assigns for each positive integer $n$, the number of distinct subwords of length $n$ in $w$. The subword complexity of a word is a good measure of the randomness of the word and gives insight to what the word itself looks like. In this paper, we discuss the properties of subword complexity sequences, and consider different variables that influence their shape. We also compute the number of distinct subword complexity sequences for certain lengths of words over different alphabets, and state some conjec…
We prove that for any distinct $x,y \in \{0,1\}^n$, there is a deterministic finite automaton with $\widetilde{O}(n^{1/3})$ states that accepts $x$ but not $y$. This improves Robson's 1989 upper bound of $\widetilde{O}(n^{2/5})$.
We re-examine previous constructions of infinite binary words containing few distinct squares with the goal of finding the "simplest", in a certain sense. We exhibit several new constructions. Rather than using tedious case-based arguments to prove that the constructions have the desired property, we rely instead on theorem-proving software for their correctness.
On the Number of Rational Power Factors in a Finite Word
Hangzhou International Innovation Institute of Beihang University(北京航空航天大学杭州创新研究院);LMIB-School of Mathematical Sciences, Beihang University(北京航空航天大学数学科学学院)
Trapezoidal words are words having at most $n+1$ distinct factors of length $n$ for every $n\ge 0$. They therefore encompass finite Sturmian words. We give combinatorial characterizations of trapezoidal words and exhibit a formula for their enumeration. We then separate trapezoidal words into two disjoint classes: open and closed. A trapezoidal word is closed if it has a factor that occurs only as a prefix and as a suffix; otherwise it is open. We investigate open and closed trapezoidal words, in relation with their special factors. We prove that Sturmian palindromes are closed trapezoidal wor…
This note is an attempt to attack a conjecture of Fraenkel and Simpson stated in 1998 concerning the number of distinct squares in a finite word. By counting the number of (right-)special factors, we give an upper bound of the number of {\em $k$-powers} in a finite word for any integer $k\geq 3$. By {\em $k$-power}, we mean a word of the form $\underbrace{uu...u}_{k \; \text{times}}$.
Following earlier work by Aldo de Luca and others, we study trapezoidal words and their prefixes, with respect to their characteristic parameters $K$ and $R$ (length of shortest unrepeated suffix, and shortest length without right special factors, respectively), as well as their symmetric versions $H$ and $L$. We consider the distinction between closed (i.e., periodic-like) and open prefixes, and between Sturmian and non-Sturmian ones. Our main results characterize right special and strictly bispecial trapezoidal words, as done by de Luca and Mignosi for Sturmian words.
A universal cycle for permutations is a word of length n! such that each of the n! possible relative orders of n distinct integers occurs as a cyclic interval of the word. We show how to construct such a universal cycle in which only n+1 distinct integers are used. This is best possible and proves a conjecture of Chung, Diaconis and Graham.
In [X. Droubay et al, Episturmian words and some constructions of de Luca and Rauzy, Theoret. Comput. Sci. 255 (2001)], it was proved that every word w has at most |w|+1 many distinct palindromic factors, including the empty word. The unified study of words which achieve this limit was initiated in [A. Glen et al, Palindromic richness, Eur. Jour. of Comb. 30 (2009)]. They called these words rich (in palindromes). This article contains several results about rich words and especially extending them. We say that a rich word w can be extended richly with a word u if wu is rich. Some notions are al…
A finite word $w$ is called \emph{rich} if it contains $\vert w\vert+1$ distinct palindromic factors including the empty word. For every finite rich word $w$ there are distinct nonempty palindromes $w_1, w_2,\dots,w_p$ such that $w=w_pw_{p-1}\cdots w_1$ and $w_i$ is the longest palindromic suffix of $w_pw_{p-1}\cdots w_i$, where $1\leq i\leq p$. This palindromic factorization is called \emph{UPS-factorization}. Let $luf(w)=p$ be \emph{the length of UPS-factorization} of $w$. In 2017, it was proved that there is a constant $c$ such that if $w$ is a finite rich word and $n=\vert w\vert$ then $lu…
Any finite word $w$ of length $n$ contains at most $n+1$ distinct palindromic factors. If the bound $n+1$ is reached, the word $w$ is called rich. The number of rich words of length $n$ over an alphabet of cardinality $q$ is denoted $R_n(q)$. For binary alphabet, Rubinchik and Shur deduced that ${R_n(2)}\leq c 1.605^n $ for some constant $c$. We prove that $\lim\limits_{n\rightarrow \infty }\sqrt[n]{R_n(q)}=1$ for any $q$, i.e. $R_n(q)$ has a subexponential growth on any alphabet.
Originally introduced and studied by the third and fourth authors together with J. Justin and S. Widmer in arXiv:0801.1656, rich words constitute a new class of finite and infinite words characterized by containing the maximal number of distinct palindromes. Several characterizations of rich words have already been established. A particularly nice characteristic property is that all 'complete returns' to palindromes are palindromes. In this note, we prove that rich words are also characterized by the property that each factor is uniquely determined by its longest palindromic prefix and its lon…
A two-dimensional ($2$D) word is a $2$D palindrome if it is equal to its reverse and it is an HV-palindrome if all its columns and rows are $1$D palindromes. We study some combinatorial and structural properties of HV-palindromes and its comparison with $2$D palindromes. We investigate the maximum number number of distinct non-empty HV-palindromic sub-arrays in any finite $2$D word, thus, proving the conjecture given by Anisiua et al. We also find the least number of HV-palindromes in an infinite $2$D word over a finite alphabet size $q$.
A finite word $w$ of length $n$ contains at most $n+1$ distinct palindromic factors. If the bound $n+1$ is attained, the word $w$ is called rich. An infinite word $w$ is called rich if every finite factor of $w$ is rich. Let $w$ be a word (finite or infinite) over an alphabet with $q>1$ letters, let $F(w,n)$ be the set of factors of length $n$ of the word $w$, and let $F_p(w,n)\subseteq F(w,n)$ be the set of palindromic factors of length $n$ of the word $w$. We present several upper bounds for $| F(w,n)|$ and $| F_p(w,n)|$, where $w$ is a rich word. In particular we show that \[| F(w,n)| \leq …
A finite word $w$ with $\vert w\vert=n$ contains at most $n+1$ distinct palindromic factors. If the bound $n+1$ is attained, the word $w$ is called \emph{rich}. Let $\Factor(w)$ be the set of factors of the word $w$. It is known that there are pairs of rich words that cannot be factors of a common rich word. However it is an open question how to decide for a given pair of rich words $u,v$ if there is a rich word $w$ such that $\{u,v\}\subseteq \Factor(w)$. We present a response to this open question:\\ If $w_1, w_2,w$ are rich words, $m=\max{\{\vert w_1\vert,\vert w_2\vert\}}$, and $\{w_1,w_2\…
Fici, Restivo, Silva, and Zamboni define a $\textit{$k$-anti-power}$ to be a concatenation of $k$ consecutive words that are pairwise distinct and have the same length. They ask for the maximum $k$ such that every aperiodic recurrent word must contain a $k$-anti-power, and they prove that this maximum must be 3, 4, or 5. We resolve this question by demonstrating that the maximum is 5. We also conjecture that if $W$ is a reasonably nice aperiodic morphic word, then there is some constant $C = C(W)$ such that for all $i,k\geq 1$, $W$ contains a $k$-anti-power with blocks of length at most $Ck$ b…
It is a fundamental property of non-letter Lyndon words that they can be expressed as a concatenation of two shorter Lyndon words. This leads to a naive lower bound log_{2}(n)} + 1 for the number of distinct Lyndon factors that a Lyndon word of length n must have, but this bound is not optimal. In this paper we show that a much more accurate lower bound is log_{phi}(n) + 1, where phi denotes the golden ratio (1 + sqrt{5})/2. We show that this bound is optimal in that it is attained by the Fibonacci Lyndon words. We then introduce a mapping L_x that counts the number of Lyndon factors of length…
In this paper we consider the following question in the spirit of Ramsey theory: Given $x\in A^ω,$ where $A$ is a finite non-empty set, does there exist a finite coloring of the non-empty factors of $x$ with the property that no factorization of $x$ is monochromatic? We prove that this question has a positive answer using two colors for almost all words relative to the standard Bernoulli measure on $A^ω.$ We also show that it has a positive answer for various classes of uniformly recurrent words, including all aperiodic balanced words, and all words $x\in A^ω$ satisfying $λ_x(n+1)-λ_x(n)=1$ fo…
In this book chapter, written in French, we consider the classical family of Sturmian words, defined as the aperiodic infinite words containing only $n+1$ factors of a length $n$, which is the minimal possible value. We will discuss several techniques for Sturmian words which have not been described in monographs. In particular, we will consider the geometric dual method by Berstel and Pocchiola and the link between palindrome factors and Ostrowski numeration systems. We will also discuss a conjecture on palindromic length which was proved on Sturmian words by two completely different methods …
We say that a word $w$ of length $kn$ is a $k$-\textit{antipower} if it can be written in the form $w_1 \cdots w_k$, where each $w_i$ is a distinct word of length $n$. We analyze prefixes of the Thue-Morse word $\textbf{t}$ and lengths of antipowers occurring in them. Define $Γ(k)$ to be the largest odd $n$ such that the prefix of $\textbf{t}$ of length $kn$ is not a $k$-antipower, and $γ(k)$ to be the smallest odd $n$ such that the corresponding prefix is a $k$-antipower. We provide strong bounds on the asymptotic values of $γ(k)$ and $Γ(k)-γ(k)$. Our bounds on $γ(k)$ affirmatively answer one…
In this paper we prove that for any infinite word W whose set of factors is closed under reversal, the following conditions are equivalent: (I) all complete returns to palindromes are palindromes; (II) P(n) + P(n+1) = C(n+1) - C(n) + 2 for all n, where P (resp. C) denotes the palindromic complexity (resp. factor complexity) function of W, which counts the number of distinct palindromic factors (resp. factors) of each length in W.
Let $W^{(n)}$ be the $n$-letter word obtained by repeating a fixed word $W$, and let $R_n$ be a random $n$-letter word over the same alphabet. We show several results about the length of the longest common subsequence (LCS) between $W^{(n)}$ and $R_n$; in particular, we show that its expectation is $γ_W n-O(\sqrt{n})$ for an efficiently-computable constant $γ_W$. This is done by relating the problem to a new interacting particle system, which we dub "frog dynamics". In this system, the particles (`frogs') hop over one another in the order given by their labels. Stripped of the labeling, the fr…