We exhibit a recurrence on the number of discrete line segments joining two integer points in the plane using an encoding of such segments as balanced words of given length and height over the two-letter alphabet $\{0,1\}$. We give generating functions and study the asymptotic behaviour. As a particular case, we focus on the symmetrical discrete segments which are encoded by balanced palindromes.
We revisit the question of classification of balanced circular words and focus on the case of a ternary alphabet. We propose a $3$-dimensional generalisation of the discrete approximation representation of Christoffel words. By considering the minimal bound $3$ for abelian complexity of balanced circular words over a ternary alphabet, we provide a classification of all circular words over a ternary alphabet with abelian complexity subject to this bound. This result also allows us to construct an uncountable set of bi-infinite aperiodic words with abelian complexity equal to $3$.
Carpi (1993) and Lepisto (1994) proved independently that smooth words are cube-free for the alphabet {1, 2}, but nothing is known on whether for the other 2-letter alphabets, smooth words are k-power-free for some suitable positive integer k. In this paper, we first establish the derivative formula of the concatenation of two smooth words and power derivative formula of smooth words over arbitrary 2-letter alphabets. Then by making use of power derivative formula, for arbitrary 2-letter alphabet {a, b} with a, b being positive integers and a<b, we prove that smooth words are (b+1)-power-free …
We construct an infinite word $w$ over the $5$-letter alphabet such that for every factor $f$ of $w$ of length at least two, there exists a cyclic permutation of $f$ that is not a factor of $w$. In other words, $w$ does not contain a non-trivial conjugacy class. This proves the conjecture in Gamard et al. [TCS 2018]
We shall characterize the structure of invertible substitutions on three-letter alphabet. We show that any invertible substitution, after some cyclic operation, can be written as a finite product of permutations and Fibonacci's substitution. As a consequence, a matrix (of order 3 and with non-negative integral coefficients) is the matrix of an invertible substitution if and only if it is a finite product of non-negative elementary matrices.
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.
Brlek et al. (2008) studied smooth infinite words and established some results on letter frequency, recurrence, reversal and complementation for 2-letter alphabets having same parity. In this paper, we explore smooth infinite words over $n$-letter alphabet $\{a_1,a_2,...,a_n\}$, where $a_1<a_2<...<a_n$ are positive integers and have same remainder when divided by $n$. And let $a_i=n\cdot q_i+r,\;q_i\in N$ for $i=1,2,...,n$, where $r=0,1,2,...,n-1$. We use distinct methods to prove that (1) if $r=0$, the letters frequency of two times differentiable well-proportioned infinite words is $1/n$, wh…
We study the threshold between avoidable and unavoidable repetitions in infinite balanced sequences over finite alphabets. The conjecture stated by Rampersad, Shallit and Vandomme says that the minimal critical exponent of balanced sequences over the alphabet of size $d \geq 5$ equals $\frac{d-2}{d-3}$. This conjecture is known to hold for $d\in \{5, 6, 7,8,9,10\}$. We refute this conjecture by showing that the picture is different for bigger alphabets. We prove that critical exponents of balanced sequences over an alphabet of size $d\geq 11$ are lower bounded by $\frac{d-1}{d-2}$ and this bou…
We investigate the asymptotic standard deviation of the Longest Common Subsequence (LCS) of two independent i.i.d. sequences of length n. The first sequence is drawn from a three letter alphabet {0,1,a}, whilst the second sequence is binary. The main result of this article is that in this asymmetric case, the standard deviation of the length of the LCS is of order square root of n. This confirms Waterman's conjecture for this special case. Our result seems to indicate that in many other situations the order of the standard deviation is also square root of n.
Consider a graph G = G(k,d,s) with vertex set the set of all k-letter words over an alphabet of size d. An edge e = vw is in E iff v is distinct from w and the last(first) k-s letters of v are identical to the first(last) k-s letters of w. In this paper we show that G is Hamiltonian for all non-trivial values of the parameters and obtain exact values for its chromatic number when s is greater than or equal to k/2. We also obtain bounds when the chromatic number is less than k/2.
It is well known that Sturmian sequences are the aperiodic sequences that are balanced over a 2-letter alphabet. They are also characterized by their complexity: they have exactly $(n+1)$ factors of length $n$. One possible generalization of Sturmian sequences is the set of infinite sequences over a $k$-letter alphabet, $k \geq 3$, which are closed under reversal and have at most one right special factor for each length. This is the set of episturmian sequences. These are not necessarily balanced over a $k$-letter alphabet, nor are they necessarily aperiodic. In this paper, we characterize bal…
A finite deterministic (semi)automaton $\mathcal{A} =(Q,Σ,δ)$ is $k$-compressible if there is some word $w\in Σ^+$ such that the image of its state set $Q$ under the natural action of $w$ is reduced by at least $k$ states. Such word, if it exists, is called a $k$-compressing word for $\mathcal{A}$. A word is $k$-collapsing if it is $k$-compressing for each $k$-compressible automaton. We compute a set $W$ of short words such that each $3$-compressible automata on a two letter alphabet is $3$-compressed at least by a word in $W$. Then we construct a shortest common superstring of the words in $W…
A word is square-free if it does not contain a nonempty word of the form $XX$ as a factor. A famous 1906 result of Thue asserts that there exist arbitrarily long square-free words over a $3$-letter alphabet. We study square-free words with additional properties involving single-letter deletions and extensions of words. A square-free word is steady if it remains square-free after deletion of any single letter. We prove that there exist infinitely many steady words over a $4$-letter alphabet. We also demonstrate that one may construct steady words of any length by picking letters from arbitrary …
Let $γ_{a,b}(n)$ be the number of smooth words of length $n$ over the alphabet $\{a,b\}$ with $a<b$. Say that a smooth word $w$ is \emph{left fully extendable} (LFE) if both $aw$ and $bw$ are smooth. In this paper, we prove that for any positive number $ξ$ and positive integer $n_{0}$ such that the proportion of $b$'s is larger than $ξ$ for each LFE word of length exceeding $n_0$, there are two constants $c_{1}\,\textrm{and}\, c_{2}$ such that for each positive integer $n$, one has {eqnarray} c_{1}\cdot n^{\frac{\log (2b-1)}{\log (1+(a+b-2)(1-ξ))}}<γ_{a,b}(n)< c_2\cdot n^{\frac{\log (2b-1)}{\l…
Recently, Grytczuk, Kordulewski, and Niewiadomski defined an extremal word over an alphabet $\mathbb{A}$ to be a word with the property that inserting any letter from $\mathbb{A}$ at any position in the word yields a given pattern. In this paper, we determine the number of extremal $XY_1XY_2X\dots XY_tX$-avoiding words on a $k$-letter alphabet. We also derive a lower bound on the shortest possible length of an extremal square-free word on a $k$-letter alphabet that grows exponentially in $k$.
We propose to use tensor diagrams and the Fomin-Pylyavskyy conjectures to explore the connection between symbol alphabets of $n$-particle amplitudes in planar $\mathcal{N}=4$ Yang-Mills theory and certain polytopes associated to the Grassmannian G(4, $n$). We show how to assign a web (a planar tensor diagram) to each facet of these polytopes. Webs with no inner loops are associated to cluster variables (rational symbol letters). For webs with a single inner loop we propose and explicitly evaluate an associated web series that contains information about algebraic symbol letters. In this manner …
Building an infinite square-free word by appending one letter at a time while simultaneously avoiding the creation of squares is most likely to fail. When the alphabet has two letters this approach is impossible. When the alphabet has three or more letters, one will most probably create a word in which the addition of any letter invariably creates a square. When one restricts the set of undesired squares to a finite one, this can be possible. We study the constraints on the alphabet and the set of squares which permit this approach to work.
Sturmian sequences are well-known as the ones having minimal complexity over a 2-letter alphabet. They are also the balanced sequences over a 2-letter alphabet and the sequences describing discrete lines. They are famous and have been extensively studied since the 18th century. One of the {extensions} of these sequences over a $k$-letter alphabet, with $k\geq 3$, are the episturmian sequences, which generalizes a construction of Sturmian sequences using the palindromic closure operation. There exists a finite version of the Sturmian sequences called the Christoffel words. They are known since …
A word is square-free if it does not contain nonempty factors of the form $XX$. In 1906 Thue proved that there exist arbitrarily long square-free words over a $3$-letter alphabet. It was proved recently [7] that among these words there are infinitely many extremal ones, that is, having a square in every single-letter extension. We study diverse problems concerning extensions of words preserving the property of avoiding squares. Our main motivation is the conjecture stating that there are no extremal words over a $4$-letter alphabet. We also investigate a natural recursive procedure of generati…
The repetition threshold for words on $n$ letters, denoted $\mbox{RT}(n)$, is the infimum of the set of all $r$ such that there are arbitrarily long $r$-free words over $n$ letters. A repetition threshold for circular words on $n$ letters can be defined in three natural ways, which gives rise to the weak, intermediate, and strong circular repetition thresholds for $n$ letters, denoted $\mbox{CRT}_{\mbox{W}}(n)$, $\mbox{CRT}_{\mbox{I}}(n)$, and $\mbox{CRT}_{\mbox{S}}(n)$, respectively. Currie and the present authors conjectured that $\mbox{CRT}_{\mbox{I}}(n)=\mbox{CRT}_{\mbox{W}}(n)=\mbox{RT}(n…
Consider infinite random words over a finite alphabet where the letters occur as an i.i.d. sequence according to some arbitrary distribution on the alphabet. The expectation and the variance of the waiting time for the first completed $h$-run of any letter (i.e., first occurrence of $h$ subsequential equal letters) is computed. The expected waiting time for the completion of $h$-runs of $j$ arbitrary distinct letters is also given.
We study aperiodic balanced sequences over finite alphabets. A sequence vv of this type is fully characterised by a Sturmian sequence u and two constant gap sequences y and y'. We show that the language of v is eventually dendric and we focus on return words to its factors. We develop a method for computing the critical exponent and asymptotic critical exponent of balanced sequences, provided the associated Sturmian sequence u has a quadratic slope. The method is based on looking for the shortest return words to bispecial factors in v. We illustrate our method on several examples; in particula…
A word is \emph{square-free} if it does not contain non-empty factors of the form $XX$. In 1906 Thue proved that there exist arbitrarily long square-free words over $3$-letter alphabet. We consider a new type of square-free words. A square-free word is \emph{extremal} if it cannot be extended to a new square-free word by inserting a single letter on arbitrary position. We prove that there exist infinitely many extremal words over $3$-letter alphabet. Some parts of our construction relies on computer verifications. We also pose some related open problems.
A family of partial orders in the free monoid of words, induced from a partial order in alphabet, is presented. The induced orders generalize the chronological posets that have been defined for the two-letter alphabet only, and the morphological order. We show that the induced orders are natural with respect to alphabet homomorphisms.
Vincular or dashed patterns resemble classical patterns except that some of the letters within an occurrence are required to be adjacent. We prove several infinite families of Wilf-equivalences for k-ary words involving vincular patterns containing a single dash, which explain the majority of the equivalences witnessed for such patterns of length four. When combined with previous results, numerical evidence, and some arguments in specific cases, we obtain the complete Wilf-classification for all vincular patterns of length four containing a single dash. In some cases, our proof shows further t…
Lambda words are sequences obtained by encoding the differences between ordered elements of the form i+jθ, where i and j are non-negative integers and 1 < θ<2. Lambda words are right-infinite words defined over an infinite alphabet that have connections with Sturmian words, Christoffel words, and interspersion arrays. We show that Lambda words are infinite rich words. Furthermore, any Lambda word may be mapped onto a right-infinite word over a three-letter alphabet. Although the mapping preserves palindromes and non-palindromes of the Lambda word, the resulting Gamma word is not rich.
We consider two games between two players Ann and Ben who build a word together by adding alternatively a letter at the end of the shared word. In the nonrepetitive game, Ben wins the game if he can create a square of length at least $4$, and Ann wins if she can build an arbitrarily long word before that. In the erase-repetition game, whenever a square occurs the second part of the square is erased and the goal of Ann is still to build an arbitrarily large word (Ben simply wants to limit the size of the word in this game). Grytczuk, Kozik, and Micek showed that Ann has a winning strategy for t…
Let $A_q$ be a $q$-letter alphabet and $w$ be a right infinite word on this alphabet. A subword of $w$ is a block of consecutive letters of $w$. The subword complexity function of $w$ assigns to each positive integer $n$ the number $f_w(n)$ of distinct subwords of length $n$ of $w$. The gap function of an infinite word over the binary alphabet $\{0,1 \}$ gives the distances between consecutive 1's in this word. In this paper we study infinite binary words whose gap function is injective or "almost injective". A method for computing the subword complexity of such words is given. A necessary and…
In 2008, Kurosaki gave a new construction of a (bi-)infinite squarefree word over three letters. We show that in fact Kurosaki's word avoids 7/4+-powers, which, as shown by Dejean, is optimal over a 3-letter alphabet.
Chen, Kitaev, Mütze, and Sun recently introduced the notion of universal partial words, a generalization of universal words and de Bruijn sequences. Universal partial words allow for a wild-card character $\diamond$, which is a placeholder for any letter in the alphabet. We settle and strengthen conjectures posed in the same paper where this notion was introduced. For non-binary alphabets, we show that universal partial words have periodic $\diamond$ structure and are cyclic, and we give number-theoretic conditions on the existence of universal partial words. In addition, we provide an explici…
We define a quantity $c_m(n,k)$ as a generalization of the notion of the composition of the positive integer $n$ into $k$ parts. We proceed to derive some known properties of this quantity. In particular, we relate two partial Bell polynomials, in which the sequence of the variables of one polynomial is the invert transform of the sequence of the variables of the other. We connect the quantities $c_m(n,k)$ and $c_{m-1}(n,k)$ via Pascal matrices. We then relate $c_m(n,k)$ with the numbers of some restricted words over a finite alphabet. We develop a method which transfers some properties of res…
A word $u$ is a scattered factor of $w$ if $u$ can be obtained from $w$ by deleting some of its letters. That is, there exist the (potentially empty) words $u_1,u_2,..., u_n$, and $v_0,v_1,..,v_n$ such that $u = u_1u_2...u_n$ and $w = v_0u_1v_1u_2v_2...u_nv_n$. We consider the set of length-$k$ scattered factors of a given word w, called here $k$-spectrum and denoted $\ScatFact_k(w)$. We prove a series of properties of the sets $\ScatFact_k(w)$ for binary strictly balanced and, respectively, $c$-balanced words $w$, i.e., words over a two-letter alphabet where the number of occurrences of each …
In this short note, we first associate a new simple undirected graph with a given word over an ordered alphabet of $n$-letters. We will call it the Lyndon graph of that word. Then, we introduce the concept of the Lyndon-word representable graph as a graph isomorphic to a Lyndon graph of some word. Then, we introduce the generalized Stirling cycle number $S(N;n,k)$ as the number words of length $N$ with $k$ distinct Lydon words in their Lyndon factorization over an ordered alphabet of $n$-letters . Finally, we conclude the paper with several interesting open questions and conjectures for intere…
In a recent paper of Rampersad et al., the authors conjectured that the smallest possible critical exponent of an infinite balanced word over a 5-letter alphabet is $3/2$. We prove this result, using a formulation of first-order logic, the Pell number system, and a machine computation based on finite-state automata.
Universal Cycles, or U-cycles, as originally defined by de Bruijn, are an efficient method to exhibit a large class of combinatorial objects in a compressed fashion, and with no repeats. de Bruijn's theorem states that U-cycles for $n$ letter words on a $k$ letter alphabet exist for all $k$ and $n$. Much has already been proved about Universal Cycles for a variety of other objects. This work is intended to augment the current research in the area by exhibiting U-cycles for {\it complementary classes}. Results will be presented that exhibit the existence of U-cycles for class-alternating words …
We use discrete Morse theory to determine the Möbius function of generalized factor order. Ordinary factor order on the Kleene closure A* of a set A is the partial order defined by letting u\leq w if w contains u as a subsequence of consecutive letters. The Möbius function of ordinary factor order was determined by Björner. Using Babson and Hersh's application of Robin Forman's discrete Morse theory to lexicographically ordered chains, we are able to gain new understanding of Björner's result and its proof. We generalize the notion of factor order to take into account a partial order on the al…
A word is square-free if it does not contain any square (a word of the form $XX$), and is extremal square-free if it cannot be extended to a new square-free word by inserting a single letter at any position. Grytczuk, Kordulewski, and Niewiadomski proved that there exist infinitely many ternary extremal square-free words. We establish that there are no extremal square-free words over any alphabet of size at least 17.
Two finite words $u,v$ are 2-binomially equivalent if, for all words $x$ of length at most 2, the number of occurrences of $x$ as a (scattered) subword of $u$ is equal to the number of occurrences of $x$ in $v$. This notion is a refinement of the usual abelian equivalence. A 2-binomial square is a word $uv$ where $u$ and $v$ are 2-binomially equivalent. In this paper, considering pure morphic words, we prove that 2-binomial squares (resp. cubes) are avoidable over a 3-letter (resp. 2-letter) alphabet. The sizes of the alphabets are optimal.
Consider two random strings having the same length and generated by an iid sequence taking its values uniformly in a fixed finite alphabet. Artificially place a long constant block into one of the strings, where a constant block is a contiguous substring consisting only of one type of symbol. The long block replaces a segment of equal size and its length is smaller than the length of the strings, but larger than its square-root. We show that for sufficiently long strings the optimal alignment corresponding to a Longest Common Subsequence (LCS) treats the inserted block very differently dependi…
In 1985, Restivo and Salemi presented a list of five problems concerning power free languages. Problem $4$ states: Given $α$-power-free words $u$ and $v$, decide whether there is a transition from $u$ to $v$. Problem $5$ states: Given $α$-power-free words $u$ and $v$, find a transition word $w$, if it exists. Let $Σ_k$ denote an alphabet with $k$ letters. Let $L_{k,α}$ denote the $α$-power free language over the alphabet $Σ_k$, where $α$ is a rational number or a rational "number with $+$". If $α$ is a "number with $+$" then suppose $k\geq 3$ and $α\geq 2$. If $α$ is "only" a number then suppo…
Covering arrays for words of length $t$ over a $d$ letter alphabet are $k \times n$ arrays with entries from the alphabet so that for each choice of $t$ columns, each of the $d^t$ $t$-letter words appears at least once among the rows of the selected columns. We study two schemes in which all words are not considered to be different. In the first case words are equivalent if they induce the same partition of a $t$ element set. In the second case, words of the same weight are equivalent. In both cases we produce logarithmic upper bounds on the minimum size $k=k(n)$ of a covering array. Definitiv…
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.
A $t-\a$ covering array is an $m\times n$ matrix, with entries from an alphabet of size $α$, such that for any choice of $t$ rows, and any ordered string of $t$ letters of the alphabet, there exists a column such that the "values" of the rows in that column match those of the string of letters. We use the Lovász Local Lemma in conjunction with a new tiling-based probability model to improve the upper bound on the smallest number of columns $N=N(m,t,α)$ of a $t-\a$ covering array.
A double occurrence word $w$ over a finite alphabet $Σ$ is a word in which each alphabet letter appears exactly twice. Such words arise naturally in the study of topology, graph theory, and combinatorics. Recently, double occurrence words have been used for studying DNA recombination events. We develop formulas for counting and enumerating several elementary classes of double occurrence words such as palindromic, irreducible, and strongly-irreducible words.
Generalized balance tournament packings (GBTPs) extend the concept of generalized balanced tournament designs introduced by Lamken and Vanstone (1989). In this paper, we establish the connection between GBTPs and a class of codes called equitable symbol weight codes. The latter were recently demonstrated to optimize the performance against narrowband noise in a general coded modulation scheme for power line communications. By constructing classes of GBTPs, we establish infinite families of optimal equitable symbol weight codes with code lengths greater than alphabet size and whose narrowband n…
It is well known that Universal Cycles of $k$-letter words on an $n$-letter alphabet exist for all $k$ and $n$. In this paper, we prove that Universal Cycles exist for restricted classes of words, including: non-bijections, equitable words (under suitable restrictions), ranked permutations, and "passwords".
We establish a total lexicographical order on the set of Motzkin words. Elements are ordered similarly to Natural Numbers in accordance with known rules (axioms). As a result, we were able to obtain arithmetic and logical operations on the elements of the ordered sequence, Motzkin Row. This sequence consists of balanced brackets without leading zeros, with the exception of the initial word "0". It is the word "0" as well as the alphabetical symbol "0" that are analogues of numeric zero in the corresponding operations. Logical operations allow you to navigate Motzkin Row. Operations on words ar…