-
Some Remarks on Palindromic Periodicities
Authors:
Gabriele Fici,
Jeffrey Shallit,
Jamie Simpson
Abstract:
We say a finite word $x$ is a palindromic periodicity if there exist two palindromes $p$ and $s$ such that $|x| \geq |ps|$ and $x$ is a prefix of the word $(ps)^ω= pspsps\cdots$. In this paper we examine the palindromic periodicities occurring in some classical infinite words, such as Sturmian words, episturmian words, the Thue-Morse word, the period-doubling word, the Rudin-Shapiro word, the pape…
▽ More
We say a finite word $x$ is a palindromic periodicity if there exist two palindromes $p$ and $s$ such that $|x| \geq |ps|$ and $x$ is a prefix of the word $(ps)^ω= pspsps\cdots$. In this paper we examine the palindromic periodicities occurring in some classical infinite words, such as Sturmian words, episturmian words, the Thue-Morse word, the period-doubling word, the Rudin-Shapiro word, the paperfolding word, and the Tribonacci word, and prove a number of results about them. We also prove results about words with the smallest number of palindromic periodicities.
△ Less
Submitted 10 August, 2024; v1 submitted 15 July, 2024;
originally announced July 2024.
-
Some Results on Digital Segments and Balanced Words
Authors:
Alessandro De Luca,
Gabriele Fici
Abstract:
We exhibit combinatorial results on Christoffel words and binary balanced words that are motivated by their geometric interpretation as approximations of digital segments. We show that for every pair $(a,b)$ of positive integers, all the binary balanced words with $a$ zeroes and $b$ ones are good approximations of the Euclidean segment from $(0,0)$ to $(a,b)$, in the sense that they encode paths t…
▽ More
We exhibit combinatorial results on Christoffel words and binary balanced words that are motivated by their geometric interpretation as approximations of digital segments. We show that for every pair $(a,b)$ of positive integers, all the binary balanced words with $a$ zeroes and $b$ ones are good approximations of the Euclidean segment from $(0,0)$ to $(a,b)$, in the sense that they encode paths that are contained within the region of the grid delimited by the lower and the upper Christoffel words of slope $b/a$. We then give a closed formula for counting the exact number of balanced words with $a$ zeroes and $b$ ones. We also study minimal non-balanced words and prefixes of Christoffel words.
△ Less
Submitted 7 January, 2024; v1 submitted 17 November, 2022;
originally announced November 2022.
-
Maximal Closed Substrings
Authors:
Golnaz Badkobeh,
Alessandro De Luca,
Gabriele Fici,
Simon Puglisi
Abstract:
A string is closed if it has length 1 or has a nonempty border without internal occurrences. In this paper we introduce the definition of a \emph{maximal closed substring} (MCS), which is an occurrence of a closed substring that cannot be extended to the left nor to the right into a longer closed substring. MCSs with exponent at least $2$ are commonly called \emph{runs}; those with exponent smalle…
▽ More
A string is closed if it has length 1 or has a nonempty border without internal occurrences. In this paper we introduce the definition of a \emph{maximal closed substring} (MCS), which is an occurrence of a closed substring that cannot be extended to the left nor to the right into a longer closed substring. MCSs with exponent at least $2$ are commonly called \emph{runs}; those with exponent smaller than $2$, instead, are particular cases of \emph{maximal gapped repeats}. We provide an algorithm that, given a string of length $n$ locates all MCSs the string contains in $\mathcal O(n\log n)$ time.
△ Less
Submitted 14 May, 2024; v1 submitted 1 September, 2022;
originally announced September 2022.
-
Abelian Combinatorics on Words: a Survey
Authors:
Gabriele Fici,
Svetlana Puzynina
Abstract:
We survey known results and open problems in abelian combinatorics on words. Abelian combinatorics on words is the extension to the commutative setting of the classical theory of combinatorics on words. The extension is based on \emph{abelian equivalence}, which is the equivalence relation defined in the set of words by having the same Parikh vector, that is, the same number of occurrences of each…
▽ More
We survey known results and open problems in abelian combinatorics on words. Abelian combinatorics on words is the extension to the commutative setting of the classical theory of combinatorics on words. The extension is based on \emph{abelian equivalence}, which is the equivalence relation defined in the set of words by having the same Parikh vector, that is, the same number of occurrences of each letter of the alphabet. In the past few years, there was a lot of research on abelian analogues of classical definitions and properties in combinatorics on words. This survey aims to gather these results.
△ Less
Submitted 29 December, 2022; v1 submitted 20 July, 2022;
originally announced July 2022.
-
On the Lie complexity of Sturmian words
Authors:
Alessandro De Luca,
Gabriele Fici
Abstract:
Bell and Shallit recently introduced the Lie complexity of an infinite word $s$ as the function counting for each length the number of conjugacy classes of words whose elements are all factors of $s$. They proved, using algebraic techniques, that the Lie complexity is bounded above by the first difference of the factor complexity plus one; hence, it is uniformly bounded for words with linear facto…
▽ More
Bell and Shallit recently introduced the Lie complexity of an infinite word $s$ as the function counting for each length the number of conjugacy classes of words whose elements are all factors of $s$. They proved, using algebraic techniques, that the Lie complexity is bounded above by the first difference of the factor complexity plus one; hence, it is uniformly bounded for words with linear factor complexity, and, in particular, it is at most 2 for Sturmian words, which are precisely the words with factor complexity $n+1$ for every $n$. In this note, we provide an elementary combinatorial proof of the result of Bell and Shallit and give an exact formula for the Lie complexity of any Sturmian word.
△ Less
Submitted 8 July, 2022; v1 submitted 2 June, 2022;
originally announced June 2022.
-
Properties of a Class of Toeplitz Words
Authors:
Gabriele Fici,
Jeffrey Shallit
Abstract:
We study the properties of the uncountable set of Stewart words. These are Toeplitz words specified by infinite sequences of Toeplitz patterns of the form $αβγ$, where $α,β,γ$ is any permutation of the symbols 0,1,?. We determine the critical exponent of the Stewart words, prove that they avoid the pattern $xxyyxx$, find all factors that are palindromes, and determine their subword complexity. An…
▽ More
We study the properties of the uncountable set of Stewart words. These are Toeplitz words specified by infinite sequences of Toeplitz patterns of the form $αβγ$, where $α,β,γ$ is any permutation of the symbols 0,1,?. We determine the critical exponent of the Stewart words, prove that they avoid the pattern $xxyyxx$, find all factors that are palindromes, and determine their subword complexity. An interesting aspect of our work is that we use automata-theoretic methods and a decision procedure for automata to carry out the proofs.
△ Less
Submitted 22 December, 2021;
originally announced December 2021.
-
Adaptive Learning of Compressible Strings
Authors:
Gabriele Fici,
Nicola Prezza,
Rossano Venturini
Abstract:
Suppose an oracle knows a string $S$ that is unknown to us and that we want to determine. The oracle can answer queries of the form "Is $s$ a substring of $S$?". In 1995, Skiena and Sundaram showed that, in the worst case, any algorithm needs to ask the oracle $σn/4 -O(n)$ queries in order to be able to reconstruct the hidden string, where $σ$ is the size of the alphabet of $S$ and $n$ its length,…
▽ More
Suppose an oracle knows a string $S$ that is unknown to us and that we want to determine. The oracle can answer queries of the form "Is $s$ a substring of $S$?". In 1995, Skiena and Sundaram showed that, in the worst case, any algorithm needs to ask the oracle $σn/4 -O(n)$ queries in order to be able to reconstruct the hidden string, where $σ$ is the size of the alphabet of $S$ and $n$ its length, and gave an algorithm that spends $(σ-1)n+O(σ\sqrt{n})$ queries to reconstruct $S$. The main contribution of our paper is to improve the above upper-bound in the context where the string is compressible. We first present a universal algorithm that, given a (computable) compressor that compresses the string to $τ$ bits, performs $q=O(τ)$ substring queries; this algorithm, however, runs in exponential time. For this reason, the second part of the paper focuses on more time-efficient algorithms whose number of queries is bounded by specific compressibility measures. We first show that any string of length $n$ over an integer alphabet of size $σ$ with $rle$ runs can be reconstructed with $q=O(rle (σ+ \log \frac{n}{rle}))$ substring queries in linear time and space. We then present an algorithm that spends $q \in O(σg\log n)$ substring queries and runs in $O(n(\log n + \log σ)+ q)$ time using linear space, where $g$ is the size of a smallest straight-line program generating the string.
△ Less
Submitted 19 October, 2021; v1 submitted 13 November, 2020;
originally announced November 2020.
-
Substring Complexity in Sublinear Space
Authors:
Giulia Bernardini,
Gabriele Fici,
Paweł Gawrychowski,
Solon P. Pissis
Abstract:
Shannon's entropy is a definitive lower bound for statistical compression. Unfortunately, no such clear measure exists for the compressibility of repetitive strings. Thus, ad hoc measures are employed to estimate the repetitiveness of strings, e.g., the size $z$ of the Lempel-Ziv parse or the number $r$ of equal-letter runs of the Burrows-Wheeler transform. A more recent one is the size $γ$ of a s…
▽ More
Shannon's entropy is a definitive lower bound for statistical compression. Unfortunately, no such clear measure exists for the compressibility of repetitive strings. Thus, ad hoc measures are employed to estimate the repetitiveness of strings, e.g., the size $z$ of the Lempel-Ziv parse or the number $r$ of equal-letter runs of the Burrows-Wheeler transform. A more recent one is the size $γ$ of a smallest string attractor. Let $T$ be a string of length $n$. A string attractor of $T$ is a set of positions of $T$ capturing the occurrences of all the substrings of $T$. Unfortunately, Kempa and Prezza [STOC 2018] showed that computing $γ$ is NP-hard. Kociumaka et al. [LATIN 2020] considered a new measure of compressibility that is based on the function $S_T(k)$ counting the number of distinct substrings of length $k$ of $T$, also known as the substring complexity of $T$. This new measure is defined as $δ= \sup\{S_T(k)/k, k\geq 1\}$ and lower bounds all the relevant ad hoc measures previously considered. In particular, $δ\leq γ$ always holds and $δ$ can be computed in $\mathcal{O}(n)$ time using $Θ(n)$ working space. Kociumaka et al. showed that one can construct an $\mathcal{O}(δ\log \frac{n}δ)$-sized representation of $T$ supporting efficient direct access and efficient pattern matching queries on $T$. Given that for highly compressible strings, $δ$ is significantly smaller than $n$, it is natural to pose the following question: Can we compute $δ$ efficiently using sublinear working space?
We address this algorithmic challenge by showing the following bounds to compute $δ$: $\mathcal{O}(\frac{n^3\log b}{b^2})$ time using $\mathcal{O}(b)$ space, for any $b\in[1,n]$, in the comparison model; or $\tilde{\mathcal{O}}(n^2/b)$ time using $\tilde{\mathcal{O}}(b)$ space, for any $b\in[\sqrt{n},n]$, in the word RAM model.
△ Less
Submitted 15 November, 2023; v1 submitted 16 July, 2020;
originally announced July 2020.
-
Primitive Sets of Words
Authors:
Giuseppa Castiglione,
Gabriele Fici,
Antonio Restivo
Abstract:
Given a (finite or infinite) subset $X$ of the free monoid $A^*$ over a finite alphabet $A$, the rank of $X$ is the minimal cardinality of a set $F$ such that $X \subseteq F^*$. We say that a submonoid $M$ generated by $k$ elements of $A^*$ is {\em $k$-maximal} if there does not exist another submonoid generated by at most $k$ words containing $M$. We call a set $X \subseteq A^*$ {\em primitive} i…
▽ More
Given a (finite or infinite) subset $X$ of the free monoid $A^*$ over a finite alphabet $A$, the rank of $X$ is the minimal cardinality of a set $F$ such that $X \subseteq F^*$. We say that a submonoid $M$ generated by $k$ elements of $A^*$ is {\em $k$-maximal} if there does not exist another submonoid generated by at most $k$ words containing $M$. We call a set $X \subseteq A^*$ {\em primitive} if it is the basis of a $|X|$-maximal submonoid. This definition encompasses the notion of primitive word -- in fact, $\{w\}$ is a primitive set if and only if $w$ is a primitive word. By definition, for any set $X$, there exists a primitive set $Y$ such that $X \subseteq Y^*$. We therefore call $Y$ a {\em primitive root} of $X$. As a main result, we prove that if a set has rank $2$, then it has a unique primitive root. To obtain this result, we prove that the intersection of two $2$-maximal submonoids is either the empty word or a submonoid generated by one single primitive word. For a single word $w$, we say that the set $\{x,y\}$ is a {\em bi-root} of $w$ if $w$ can be written as a concatenation of copies of $x$ and $y$ and $\{x,y\}$ is a primitive set. We prove that every primitive word $w$ has at most one bi-root $\{x,y\}$ such that $|x|+|y|<\sqrt{|w|}$. That is, the bi-root of a word is unique provided the word is sufficiently long with respect to the size (sum of lengths) of the root. Our results are also compared to previous approaches that investigate pseudo-repetitions, where a morphic involutive function $θ$ is defined on $A^*$. In this setting, the notions of $θ$-power, $θ$-primitive and $θ$-root are defined, and it is shown that any word has a unique $θ$-primitive root. This result can be obtained with our approach by showing that a word $w$ is $θ$-primitive if and only if $\{w, θ(w)\}$ is a primitive set.
△ Less
Submitted 20 May, 2020;
originally announced May 2020.
-
Generating a Gray code for prefix normal words in amortized polylogarithmic time per word
Authors:
Péter Burcsi,
Gabriele Fici,
Zsuzsanna Lipták,
Rajeev Raman,
Joe Sawada
Abstract:
A prefix normal word is a binary word with the property that no substring has more $1$s than the prefix of the same length. By proving that the set of prefix normal words is a bubble language, we can exhaustively list all prefix normal words of length $n$ as a combinatorial Gray code, where successive strings differ by at most two swaps or bit flips. This Gray code can be generated in…
▽ More
A prefix normal word is a binary word with the property that no substring has more $1$s than the prefix of the same length. By proving that the set of prefix normal words is a bubble language, we can exhaustively list all prefix normal words of length $n$ as a combinatorial Gray code, where successive strings differ by at most two swaps or bit flips. This Gray code can be generated in $\Oh(\log^2 n)$ amortized time per word, while the best generation algorithm hitherto has $\Oh(n)$ running time per word. We also present a membership tester for prefix normal words, as well as a novel characterization of bubble languages.
△ Less
Submitted 7 August, 2020; v1 submitted 5 March, 2020;
originally announced March 2020.
-
Minimal Absent Words in Rooted and Unrooted Trees
Authors:
Gabriele Fici,
Paweł Gawrychowski
Abstract:
We extend the theory of minimal absent words to (rooted and unrooted) trees, having edges labeled by letters from an alphabet $Σ$ of cardinality $σ$. We show that the set $\text{MAW}(T)$ of minimal absent words of a rooted (resp. unrooted) tree $T$ with $n$ nodes has cardinality $O(nσ)$ (resp. $O(n^{2}σ)$), and we show that these bounds are realized. Then, we exhibit algorithms to compute all mini…
▽ More
We extend the theory of minimal absent words to (rooted and unrooted) trees, having edges labeled by letters from an alphabet $Σ$ of cardinality $σ$. We show that the set $\text{MAW}(T)$ of minimal absent words of a rooted (resp. unrooted) tree $T$ with $n$ nodes has cardinality $O(nσ)$ (resp. $O(n^{2}σ)$), and we show that these bounds are realized. Then, we exhibit algorithms to compute all minimal absent words in a rooted (resp. unrooted) tree in output-sensitive time $O(n+|\text{MAW}(T)|)$ (resp. $O(n^{2}+|\text{MAW}(T)|)$ assuming an integer alphabet of size polynomial in $n$.
△ Less
Submitted 30 October, 2019; v1 submitted 28 July, 2019;
originally announced July 2019.
-
Constructing Antidictionaries in Output-Sensitive Space
Authors:
Lorraine A. K. Ayad,
Golnaz Badkobeh,
Gabriele Fici,
Alice Héliou,
Solon P. Pissis
Abstract:
A word $x$ that is absent from a word $y$ is called minimal if all its proper factors occur in $y$. Given a collection of $k$ words $y_1,y_2,\ldots,y_k$ over an alphabet $Σ$, we are asked to compute the set $\mathrm{M}^{\ell}_{y_{1}\#\ldots\#y_{k}}$ of minimal absent words of length at most $\ell$ of word $y=y_1\#y_2\#\ldots\#y_k$, $\#\notinΣ$. In data compression, this corresponds to computing th…
▽ More
A word $x$ that is absent from a word $y$ is called minimal if all its proper factors occur in $y$. Given a collection of $k$ words $y_1,y_2,\ldots,y_k$ over an alphabet $Σ$, we are asked to compute the set $\mathrm{M}^{\ell}_{y_{1}\#\ldots\#y_{k}}$ of minimal absent words of length at most $\ell$ of word $y=y_1\#y_2\#\ldots\#y_k$, $\#\notinΣ$. In data compression, this corresponds to computing the antidictionary of $k$ documents. In bioinformatics, it corresponds to computing words that are absent from a genome of $k$ chromosomes. This computation generally requires $Ω(n)$ space for $n=|y|$ using any of the plenty available $\mathcal{O}(n)$-time algorithms. This is because an $Ω(n)$-sized text index is constructed over $y$ which can be impractical for large $n$. We do the identical computation incrementally using output-sensitive space. This goal is reasonable when $||\mathrm{M}^{\ell}_{y_{1}\#\ldots\#y_{N}}||=o(n)$, for all $N\in[1,k]$. For instance, in the human genome, $n \approx 3\times 10^9$ but $||\mathrm{M}^{12}_{y_{1}\#\ldots\#y_{k}}|| \approx 10^6$. We consider a constant-sized alphabet for stating our results. We show that all $\mathrm{M}^{\ell}_{y_{1}},\ldots,\mathrm{M}^{\ell}_{y_{1}\#\ldots\#y_{k}}$ can be computed in $\mathcal{O}(kn+\sum^{k}_{N=1}||\mathrm{M}^{\ell}_{y_{1}\#\ldots\#y_{N}}||)$ total time using $\mathcal{O}(\mathrm{MaxIn}+\mathrm{MaxOut})$ space, where $\mathrm{MaxIn}$ is the length of the longest word in $\{y_1,\ldots,y_{k}\}$ and $\mathrm{MaxOut}=\max\{||\mathrm{M}^{\ell}_{y_{1}\#\ldots\#y_{N}}||:N\in[1,k]\}$. Proof-of-concept experimental results are also provided confirming our theoretical findings and justifying our contribution.
△ Less
Submitted 13 February, 2019;
originally announced February 2019.
-
Abelian Anti-Powers in Infinite Words
Authors:
Gabriele Fici,
Mickael Postic,
Manuel Silva
Abstract:
An abelian anti-power of order $k$ (or simply an abelian $k$-anti-power) is a concatenation of $k$ consecutive words of the same length having pairwise distinct Parikh vectors. This definition generalizes to the abelian setting the notion of a $k$-anti-power, as introduced in [G. Fici et al., Anti-powers in infinite words, J. Comb. Theory, Ser. A, 2018], that is a concatenation of $k$ pairwise dis…
▽ More
An abelian anti-power of order $k$ (or simply an abelian $k$-anti-power) is a concatenation of $k$ consecutive words of the same length having pairwise distinct Parikh vectors. This definition generalizes to the abelian setting the notion of a $k$-anti-power, as introduced in [G. Fici et al., Anti-powers in infinite words, J. Comb. Theory, Ser. A, 2018], that is a concatenation of $k$ pairwise distinct words of the same length. We aim to study whether a word contains abelian $k$-anti-powers for arbitrarily large $k$. S. Holub proved that all paperfolding words contain abelian powers of every order [Abelian powers in paper-folding words. J. Comb. Theory, Ser. A, 2013]. We show that they also contain abelian anti-powers of every order.
△ Less
Submitted 25 March, 2019; v1 submitted 29 October, 2018;
originally announced October 2018.
-
On Sets of Words of Rank Two
Authors:
Giuseppa Castiglione,
Gabriele Fici,
Antonio Restivo
Abstract:
Given a (finite or infinite) subset $X$ of the free monoid $A^*$ over a finite alphabet $A$, the rank of $X$ is the minimal cardinality of a set $F$ such that $X \subseteq F^*$. A submonoid $M$ generated by $k$ elements of $A^*$ is $k$-maximal if there does not exist another submonoid generated by at most $k$ words containing $M$. We call a set $X \subseteq A^*$ primitive if it is the basis of a…
▽ More
Given a (finite or infinite) subset $X$ of the free monoid $A^*$ over a finite alphabet $A$, the rank of $X$ is the minimal cardinality of a set $F$ such that $X \subseteq F^*$. A submonoid $M$ generated by $k$ elements of $A^*$ is $k$-maximal if there does not exist another submonoid generated by at most $k$ words containing $M$. We call a set $X \subseteq A^*$ primitive if it is the basis of a $|X|$-maximal submonoid. This extends the notion of primitive word: indeed, $\{w\}$ is a primitive set if and only if $w$ is a primitive word.
By definition, for any set $X$, there exists a primitive set $Y$ such that $X \subseteq Y^*$. The set $Y$ is therefore called a primitive root of $X$. As a main result, we prove that if a set has rank $2$, then it has a unique primitive root. This result cannot be extended to sets of rank larger than 2.
For a single word $w$, we say that the set $\{x,y\}$ is a {\em binary root} of $w$ if $w$ can be written as a concatenation of copies of $x$ and $y$ and $\{x,y\}$ is a primitive set. We prove that every primitive word $w$ has at most one binary root $\{x,y\}$ such that $|x|+|y|<\sqrt{|w|}$. That is, the binary root of a word is unique provided the length of the word is sufficiently large with respect to the size of the root.
Our results are also compared to previous approaches that investigate pseudo-repetitions, where a morphic involutive function $θ$ is defined on $A^*$. In this setting, the notions of $θ$-power, $θ$-primitive and $θ$-root are defined, and it is shown that any word has a unique $θ$-primitive root. This result can be obtained with our approach by showing that a word $w$ is $θ$-primitive if and only if $\{w, θ(w)\}$ is a primitive set.
△ Less
Submitted 7 June, 2019; v1 submitted 4 October, 2018;
originally announced October 2018.
-
Alignment-free sequence comparison using absent words
Authors:
Panagiotis Charalampopoulos,
Maxime Crochemore,
Gabriele Fici,
Robert Mercas,
Solon P. Pissis
Abstract:
Sequence comparison is a prerequisite to virtually all comparative genomic analyses. It is often realised by sequence alignment techniques, which are computationally expensive. This has led to increased research into alignment-free techniques, which are based on measures referring to the composition of sequences in terms of their constituent patterns. These measures, such as $q$-gram distance, are…
▽ More
Sequence comparison is a prerequisite to virtually all comparative genomic analyses. It is often realised by sequence alignment techniques, which are computationally expensive. This has led to increased research into alignment-free techniques, which are based on measures referring to the composition of sequences in terms of their constituent patterns. These measures, such as $q$-gram distance, are usually computed in time linear with respect to the length of the sequences. In this paper, we focus on the complementary idea: how two sequences can be efficiently compared based on information that does not occur in the sequences. A word is an {\em absent word} of some sequence if it does not occur in the sequence. An absent word is {\em minimal} if all its proper factors occur in the sequence. Here we present the first linear-time and linear-space algorithm to compare two sequences by considering {\em all} their minimal absent words. In the process, we present results of combinatorial interest, and also extend the proposed techniques to compare circular sequences. We also present an algorithm that, given a word $x$ of length $n$, computes the largest integer for which all factors of $x$ of that length occur in some minimal absent word of $x$ in time and space $\cO(n)$. Finally, we show that the known asymptotic upper bound on the number of minimal absent words of a word is tight.
△ Less
Submitted 7 June, 2018;
originally announced June 2018.
-
On Prefix Normal Words
Authors:
Gabriele Fici,
Zsuzsanna Lipták
Abstract:
We present a new class of binary words: the prefix normal words. They are defined by the property that for any given length $k$, no factor of length $k$ has more $a$'s than the prefix of the same length. These words arise in the context of indexing for jumbled pattern matching (a.k.a. permutation matching or Parikh vector matching), where the aim is to decide whether a string has a factor with a g…
▽ More
We present a new class of binary words: the prefix normal words. They are defined by the property that for any given length $k$, no factor of length $k$ has more $a$'s than the prefix of the same length. These words arise in the context of indexing for jumbled pattern matching (a.k.a. permutation matching or Parikh vector matching), where the aim is to decide whether a string has a factor with a given multiplicity of characters, i.e., with a given Parikh vector. Using prefix normal words, we give the first non-trivial characterization of binary words having the same set of Parikh vectors of factors. We prove that the language of prefix normal words is not context-free and is strictly contained in the language of pre-necklaces, which are prefixes of powers of Lyndon words. We discuss further properties and state open problems.
△ Less
Submitted 31 May, 2018;
originally announced May 2018.
-
Algorithms for Anti-Powers in Strings
Authors:
Golnaz Badkobeh,
Gabriele Fici,
Simon J. Puglisi
Abstract:
A string $S[1,n]$ is a power (or tandem repeat) of order $k$ and period $n/k$ if it can decomposed into $k$ consecutive equal-length blocks of letters. Powers and periods are fundamental to string processing, and algorithms for their efficient computation have wide application and are heavily studied. Recently, Fici et al. (Proc. ICALP 2016) defined an {\em anti-power} of order $k$ to be a string…
▽ More
A string $S[1,n]$ is a power (or tandem repeat) of order $k$ and period $n/k$ if it can decomposed into $k$ consecutive equal-length blocks of letters. Powers and periods are fundamental to string processing, and algorithms for their efficient computation have wide application and are heavily studied. Recently, Fici et al. (Proc. ICALP 2016) defined an {\em anti-power} of order $k$ to be a string composed of $k$ pairwise-distinct blocks of the same length ($n/k$, called {\em anti-period}). Anti-powers are a natural converse to powers, and are objects of combinatorial interest in their own right. In this paper we initiate the algorithmic study of anti-powers. Given a string $S$, we describe an optimal algorithm for locating all substrings of $S$ that are anti-powers of a specified order. The optimality of the algorithm follows form a combinatorial lemma that provides a lower bound on the number of distinct anti-powers of a given order: we prove that a string of length $n$ can contain $Θ(n^2/k)$ distinct anti-powers of order $k$.
△ Less
Submitted 25 May, 2018;
originally announced May 2018.
-
Minimal Forbidden Factors of Circular Words
Authors:
Gabriele Fici,
Antonio Restivo,
Laura Rizzo
Abstract:
Minimal forbidden factors are a useful tool for investigating properties of words and languages. Two factorial languages are distinct if and only if they have different (antifactorial) sets of minimal forbidden factors. There exist algorithms for computing the minimal forbidden factors of a word, as well as of a regular factorial language. Conversely, Crochemore et al. [IPL, 1998] gave an algorith…
▽ More
Minimal forbidden factors are a useful tool for investigating properties of words and languages. Two factorial languages are distinct if and only if they have different (antifactorial) sets of minimal forbidden factors. There exist algorithms for computing the minimal forbidden factors of a word, as well as of a regular factorial language. Conversely, Crochemore et al. [IPL, 1998] gave an algorithm that, given the trie recognizing a finite antifactorial language $M$, computes a DFA recognizing the language whose set of minimal forbidden factors is $M$. In the same paper, they showed that the obtained DFA is minimal if the input trie recognizes the minimal forbidden factors of a single word. We generalize this result to the case of a circular word. We discuss several combinatorial properties of the minimal forbidden factors of a circular word. As a byproduct, we obtain a formal definition of the factor automaton of a circular word. Finally, we investigate the case of minimal forbidden factors of the circular Fibonacci words.
△ Less
Submitted 25 May, 2018; v1 submitted 14 July, 2017;
originally announced July 2017.
-
The sequence of open and closed prefixes of a Sturmian word
Authors:
Alessandro De Luca,
Gabriele Fici,
Luca Q. Zamboni
Abstract:
A finite word is closed if it contains a factor that occurs both as a prefix and as a suffix but does not have internal occurrences, otherwise it is open. We are interested in the {\it oc-sequence} of a word, which is the binary sequence whose $n$-th element is $0$ if the prefix of length $n$ of the word is open, or $1$ if it is closed. We exhibit results showing that this sequence is deeply relat…
▽ More
A finite word is closed if it contains a factor that occurs both as a prefix and as a suffix but does not have internal occurrences, otherwise it is open. We are interested in the {\it oc-sequence} of a word, which is the binary sequence whose $n$-th element is $0$ if the prefix of length $n$ of the word is open, or $1$ if it is closed. We exhibit results showing that this sequence is deeply related to the combinatorial and periodic structure of a word. In the case of Sturmian words, we show that these are uniquely determined (up to renaming letters) by their oc-sequence. Moreover, we prove that the class of finite Sturmian words is a maximal element with this property in the class of binary factorial languages. We then discuss several aspects of Sturmian words that can be expressed through this sequence. Finally, we provide a linear-time algorithm that computes the oc-sequence of a finite word, and a linear-time algorithm that reconstructs a finite Sturmian word from its oc-sequence.
△ Less
Submitted 1 June, 2017; v1 submitted 6 January, 2017;
originally announced January 2017.
-
Abelian-Square-Rich Words
Authors:
Gabriele Fici,
Filippo Mignosi,
Jeffrey Shallit
Abstract:
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 leng…
▽ More
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.
△ Less
Submitted 24 February, 2017; v1 submitted 4 January, 2017;
originally announced January 2017.
-
On Prefix Normal Words and Prefix Normal Forms
Authors:
Péter Burcsi,
Gabriele Fici,
Zsuzsanna Lipták,
Frank Ruskey,
Joe Sawada
Abstract:
A $1$-prefix normal word is a binary word with the property that no factor has more $1$s than the prefix of the same length; a $0$-prefix normal word is defined analogously. These words arise in the context of indexed binary jumbled pattern matching, where the aim is to decide whether a word has a factor with a given number of $1$s and $0$s (a given Parikh vector). Each binary word has an associat…
▽ More
A $1$-prefix normal word is a binary word with the property that no factor has more $1$s than the prefix of the same length; a $0$-prefix normal word is defined analogously. These words arise in the context of indexed binary jumbled pattern matching, where the aim is to decide whether a word has a factor with a given number of $1$s and $0$s (a given Parikh vector). Each binary word has an associated set of Parikh vectors of the factors of the word. Using prefix normal words, we provide a characterization of the equivalence class of binary words having the same set of Parikh vectors of their factors.
We prove that the language of prefix normal words is not context-free and is strictly contained in the language of pre-necklaces, which are prefixes of powers of Lyndon words. We give enumeration results on $\textit{pnw}(n)$, the number of prefix normal words of length $n$, showing that, for sufficiently large $n$, \[ 2^{n-4 \sqrt{n \lg n}} \le \textit{pnw}(n) \le 2^{n - \lg n + 1}. \]
For fixed density (number of $1$s), we show that the ordinary generating function of the number of prefix normal words of length $n$ and density $d$ is a rational function. Finally, we give experimental results on $\textit{pnw}(n)$, discuss further properties, and state open problems.
△ Less
Submitted 28 November, 2016;
originally announced November 2016.
-
Anti-Powers in Infinite Words
Authors:
Gabriele Fici,
Antonio Restivo,
Manuel Silva,
Luca Q. Zamboni
Abstract:
In combinatorics of words, a concatenation of $k$ consecutive equal blocks is called a power of order $k$. In this paper we take a different point of view and define an anti-power of order $k$ as a concatenation of $k$ consecutive pairwise distinct blocks of the same length. As a main result, we show that every infinite word contains powers of any order or anti-powers of any order. That is, the ex…
▽ More
In combinatorics of words, a concatenation of $k$ consecutive equal blocks is called a power of order $k$. In this paper we take a different point of view and define an anti-power of order $k$ as a concatenation of $k$ consecutive pairwise distinct blocks of the same length. As a main result, we show that every infinite word contains powers of any order or anti-powers of any order. That is, the existence of powers or anti-powers is an unavoidable regularity. Indeed, we prove a stronger result, which relates the density of anti-powers to the existence of a factor that occurs with arbitrary exponent. As a consequence, we show that in every aperiodic uniformly recurrent word, anti-powers of every order begin at every position. We further show that every infinite word avoiding anti-powers of order $3$ is ultimately periodic, while there exist aperiodic words avoiding anti-powers of order $4$. We also show that there exist aperiodic recurrent words avoiding anti-powers of order $6$.
△ Less
Submitted 12 February, 2018; v1 submitted 9 June, 2016;
originally announced June 2016.
-
On the Greedy Algorithm for the Shortest Common Superstring Problem with Reversals
Authors:
Gabriele Fici,
Tomasz Kociumaka,
Jakub Radoszewski,
Wojciech Rytter,
Tomasz Waleń
Abstract:
We study a variation of the classical Shortest Common Superstring (SCS) problem in which a shortest superstring of a finite set of strings $S$ is sought containing as a factor every string of $S$ or its reversal. We call this problem Shortest Common Superstring with Reversals (SCS-R). This problem has been introduced by Jiang et al., who designed a greedy-like algorithm with length approximation r…
▽ More
We study a variation of the classical Shortest Common Superstring (SCS) problem in which a shortest superstring of a finite set of strings $S$ is sought containing as a factor every string of $S$ or its reversal. We call this problem Shortest Common Superstring with Reversals (SCS-R). This problem has been introduced by Jiang et al., who designed a greedy-like algorithm with length approximation ratio $4$. In this paper, we show that a natural adaptation of the classical greedy algorithm for SCS has (optimal) compression ratio $\frac12$, i.e., the sum of the overlaps in the output string is at least half the sum of the overlaps in an optimal solution. We also provide a linear-time implementation of our algorithm.
△ Less
Submitted 7 December, 2015; v1 submitted 26 November, 2015;
originally announced November 2015.
-
Splicing Systems from Past to Future: Old and New Challenges
Authors:
Luc Boasson,
Paola Bonizzoni,
Clelia De Felice,
Isabelle Fagnot,
Gabriele Fici,
Rocco Zaccagnino,
Rosalba Zizza
Abstract:
A splicing system is a formal model of a recombinant behaviour of sets of double stranded DNA molecules when acted on by restriction enzymes and ligase. In this survey we will concentrate on a specific behaviour of a type of splicing systems, introduced by Păun and subsequently developed by many researchers in both linear and circular case of splicing definition. In particular, we will present rec…
▽ More
A splicing system is a formal model of a recombinant behaviour of sets of double stranded DNA molecules when acted on by restriction enzymes and ligase. In this survey we will concentrate on a specific behaviour of a type of splicing systems, introduced by Păun and subsequently developed by many researchers in both linear and circular case of splicing definition. In particular, we will present recent results on this topic and how they stimulate new challenging investigations.
△ Less
Submitted 6 October, 2015;
originally announced October 2015.
-
A Note on Easy and Efficient Computation of Full Abelian Periods of a Word
Authors:
Gabriele Fici,
Thierry Lecroq,
Arnaud Lefebvre,
Élise Prieur-Gaston,
William F. Smyth
Abstract:
Constantinescu and Ilie (Bulletin of the EATCS 89, 167-170, 2006) introduced the idea of an Abelian period with head and tail of a finite word. An Abelian period is called full if both the head and the tail are empty. We present a simple and easy-to-implement $O(n\log\log n)$-time algorithm for computing all the full Abelian periods of a word of length $n$ over a constant-size alphabet. Experiment…
▽ More
Constantinescu and Ilie (Bulletin of the EATCS 89, 167-170, 2006) introduced the idea of an Abelian period with head and tail of a finite word. An Abelian period is called full if both the head and the tail are empty. We present a simple and easy-to-implement $O(n\log\log n)$-time algorithm for computing all the full Abelian periods of a word of length $n$ over a constant-size alphabet. Experiments show that our algorithm significantly outperforms the $O(n)$ algorithm proposed by Kociumaka et al. (Proc. of STACS, 245-256, 2013) for the same problem.
△ Less
Submitted 2 October, 2015;
originally announced October 2015.
-
Factorizations of the Fibonacci Infinite Word
Authors:
Gabriele Fici
Abstract:
The aim of this note is to survey the factorizations of the Fibonacci infinite word that make use of the Fibonacci words and other related words, and to show that all these factorizations can be easily derived in sequence starting from elementary properties of the Fibonacci numbers.
The aim of this note is to survey the factorizations of the Fibonacci infinite word that make use of the Fibonacci words and other related words, and to show that all these factorizations can be easily derived in sequence starting from elementary properties of the Fibonacci numbers.
△ Less
Submitted 27 August, 2015;
originally announced August 2015.
-
Fast Computation of Abelian Runs
Authors:
Gabriele Fici,
Tomasz Kociumaka,
Thierry Lecroq,
Arnaud Lefebvre,
Elise Prieur-Gaston
Abstract:
Given a word $w$ and a Parikh vector $\mathcal{P}$, an abelian run of period $\mathcal{P}$ in $w$ is a maximal occurrence of a substring of $w$ having abelian period $\mathcal{P}$. Our main result is an online algorithm that, given a word $w$ of length $n$ over an alphabet of cardinality $σ$ and a Parikh vector $\mathcal{P}$, returns all the abelian runs of period $\mathcal{P}$ in $w$ in time…
▽ More
Given a word $w$ and a Parikh vector $\mathcal{P}$, an abelian run of period $\mathcal{P}$ in $w$ is a maximal occurrence of a substring of $w$ having abelian period $\mathcal{P}$. Our main result is an online algorithm that, given a word $w$ of length $n$ over an alphabet of cardinality $σ$ and a Parikh vector $\mathcal{P}$, returns all the abelian runs of period $\mathcal{P}$ in $w$ in time $O(n)$ and space $O(σ+p)$, where $p$ is the norm of $\mathcal{P}$, i.e., the sum of its components. We also present an online algorithm that computes all the abelian runs with periods of norm $p$ in $w$ in time $O(np)$, for any given norm $p$. Finally, we give an $O(n^2)$-time offline randomized algorithm for computing all the abelian runs of $w$. Its deterministic counterpart runs in $O(n^2\logσ)$ time.
△ Less
Submitted 22 December, 2015; v1 submitted 29 June, 2015;
originally announced June 2015.
-
Linear-Time Sequence Comparison Using Minimal Absent Words & Applications
Authors:
Maxime Crochemore,
Gabriele Fici,
Robert Mercaş,
Solon P. Pissis
Abstract:
Sequence comparison is a prerequisite to virtually all comparative genomic analyses. It is often realized by sequence alignment techniques, which are computationally expensive. This has led to increased research into alignment-free techniques, which are based on measures referring to the composition of sequences in terms of their constituent patterns. These measures, such as $q$-gram distance, are…
▽ More
Sequence comparison is a prerequisite to virtually all comparative genomic analyses. It is often realized by sequence alignment techniques, which are computationally expensive. This has led to increased research into alignment-free techniques, which are based on measures referring to the composition of sequences in terms of their constituent patterns. These measures, such as $q$-gram distance, are usually computed in time linear with respect to the length of the sequences. In this article, we focus on the complementary idea: how two sequences can be efficiently compared based on information that does not occur in the sequences. A word is an {\em absent word} of some sequence if it does not occur in the sequence. An absent word is {\em minimal} if all its proper factors occur in the sequence. Here we present the first linear-time and linear-space algorithm to compare two sequences by considering {\em all} their minimal absent words. In the process, we present results of combinatorial interest, and also extend the proposed techniques to compare circular sequences.
△ Less
Submitted 22 December, 2015; v1 submitted 16 June, 2015;
originally announced June 2015.
-
Words with the Maximum Number of Abelian Squares
Authors:
Gabriele Fici,
Filippo Mignosi
Abstract:
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$.
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$.
△ Less
Submitted 11 June, 2015;
originally announced June 2015.
-
Abelian Powers and Repetitions in Sturmian Words
Authors:
Gabriele Fici,
Alessio Langiu,
Thierry Lecroq,
Arnaud Lefebvre,
Filippo Mignosi,
Jarkko Peltomäki,
Élise Prieur-Gaston
Abstract:
Richomme, Saari and Zamboni (J. Lond. Math. Soc. 83: 79-95, 2011) proved that at every position of a Sturmian word starts an abelian power of exponent $k$ for every $k > 0$. We improve on this result by studying the maximum exponents of abelian powers and abelian repetitions (an abelian repetition is an analogue of a fractional power) in Sturmian words. We give a formula for computing the maximum…
▽ More
Richomme, Saari and Zamboni (J. Lond. Math. Soc. 83: 79-95, 2011) proved that at every position of a Sturmian word starts an abelian power of exponent $k$ for every $k > 0$. We improve on this result by studying the maximum exponents of abelian powers and abelian repetitions (an abelian repetition is an analogue of a fractional power) in Sturmian words. We give a formula for computing the maximum exponent of an abelian power of abelian period $m$ starting at a given position in any Sturmian word of rotation angle $α$. vAs an analogue of the critical exponent, we introduce the abelian critical exponent $A(s_α)$ of a Sturmian word $s_α$ of angle $α$ as the quantity $A(s_α) = limsup\ k_{m}/m=limsup\ k'_{m}/m$, where $k_{m}$ (resp. $k'_{m}$) denotes the maximum exponent of an abelian power (resp.~of an abelian repetition) of abelian period $m$ (the superior limits coincide for Sturmian words). We show that $A(s_α)$ equals the Lagrange constant of the number $α$. This yields a formula for computing $A(s_α)$ in terms of the partial quotients of the continued fraction expansion of $α$. Using this formula, we prove that $A(s_α) \geq \sqrt{5}$ and that the equality holds for the Fibonacci word. We further prove that $A(s_α)$ is finite if and only if $α$ has bounded partial quotients, that is, if and only if $s_α$ is $β$-power-free for some real number $β$. Concerning the infinite Fibonacci word, we prove that: i) The longest prefix that is an abelian repetition of period $F_j$, $j>1$, has length $F_j( F_{j+1}+F_{j-1} +1)-2$ if $j$ is even or $F_j( F_{j+1}+F_{j-1} )-2$ if $j$ is odd, where $F_{j}$ is the $j$th Fibonacci number; ii) The minimum abelian period of any factor is a Fibonacci number. Further, we derive a formula for the minimum abelian periods of the finite Fibonacci words
△ Less
Submitted 18 April, 2016; v1 submitted 9 June, 2015;
originally announced June 2015.
-
Online Computation of Abelian Runs
Authors:
Gabriele Fici,
Thierry Lecroq,
Arnaud Lefebvre,
Élise Prieur-Gaston
Abstract:
Given a word $w$ and a Parikh vector $\mathcal{P}$, an abelian run of period $\mathcal{P}$ in $w$ is a maximal occurrence of a substring of $w$ having abelian period $\mathcal{P}$. We give an algorithm that finds all the abelian runs of period $\mathcal{P}$ in a word of length $n$ in time $O(n\times |\mathcal{P}|)$ and space $O(σ+|\mathcal{P}|)$.
Given a word $w$ and a Parikh vector $\mathcal{P}$, an abelian run of period $\mathcal{P}$ in $w$ is a maximal occurrence of a substring of $w$ having abelian period $\mathcal{P}$. We give an algorithm that finds all the abelian runs of period $\mathcal{P}$ in a word of length $n$ in time $O(n\times |\mathcal{P}|)$ and space $O(σ+|\mathcal{P}|)$.
△ Less
Submitted 7 January, 2015;
originally announced January 2015.
-
Universal Lyndon Words
Authors:
Arturo Carpi,
Gabriele Fici,
Stepan Holub,
Jakub Oprsal,
Marinella Sciortino
Abstract:
A word $w$ over an alphabet $Σ$ is a Lyndon word if there exists an order defined on $Σ$ for which $w$ is lexicographically smaller than all of its conjugates (other than itself). We introduce and study \emph{universal Lyndon words}, which are words over an $n$-letter alphabet that have length $n!$ and such that all the conjugates are Lyndon words. We show that universal Lyndon words exist for eve…
▽ More
A word $w$ over an alphabet $Σ$ is a Lyndon word if there exists an order defined on $Σ$ for which $w$ is lexicographically smaller than all of its conjugates (other than itself). We introduce and study \emph{universal Lyndon words}, which are words over an $n$-letter alphabet that have length $n!$ and such that all the conjugates are Lyndon words. We show that universal Lyndon words exist for every $n$ and exhibit combinatorial and structural properties of these words. We then define particular prefix codes, which we call Hamiltonian lex-codes, and show that every Hamiltonian lex-code is in bijection with the set of the shortest unrepeated prefixes of the conjugates of a universal Lyndon word. This allows us to give an algorithm for constructing all the universal Lyndon words.
△ Less
Submitted 23 June, 2014;
originally announced June 2014.
-
Normal, Abby Normal, Prefix Normal
Authors:
Péter Burcsi,
Gabriele Fici,
Zsuzsanna Lipták,
Frank Ruskey,
Joe Sawada
Abstract:
A prefix normal word is a binary word with the property that no substring has more 1s than the prefix of the same length. This class of words is important in the context of binary jumbled pattern matching. In this paper we present results about the number $pnw(n)$ of prefix normal words of length $n$, showing that $pnw(n) =Ω\left(2^{n - c\sqrt{n\ln n}}\right)$ for some $c$ and…
▽ More
A prefix normal word is a binary word with the property that no substring has more 1s than the prefix of the same length. This class of words is important in the context of binary jumbled pattern matching. In this paper we present results about the number $pnw(n)$ of prefix normal words of length $n$, showing that $pnw(n) =Ω\left(2^{n - c\sqrt{n\ln n}}\right)$ for some $c$ and $pnw(n) = O \left(\frac{2^n (\ln n)^2}{n}\right)$. We introduce efficient algorithms for testing the prefix normal property and a "mechanical algorithm" for computing prefix normal forms. We also include games which can be played with prefix normal words. In these games Alice wishes to stay normal but Bob wants to drive her "abnormal" -- we discuss which parameter settings allow Alice to succeed.
△ Less
Submitted 1 April, 2014;
originally announced April 2014.
-
A Subquadratic Algorithm for Minimum Palindromic Factorization
Authors:
Gabriele Fici,
Travis Gagie,
Juha Kärkkäinen,
Dominik Kempa
Abstract:
We give an $\mathcal{O}(n \log n)$-time, $\mathcal{O}(n)$-space algorithm for factoring a string into the minimum number of palindromic substrings. That is, given a string $S [1..n]$, in $\mathcal{O}(n \log n)$ time our algorithm returns the minimum number of palindromes $S_1,\ldots, S_\ell$ such that $S = S_1 \cdots S_\ell$. We also show that the time complexity is $\mathcal{O}(n)$ on average and…
▽ More
We give an $\mathcal{O}(n \log n)$-time, $\mathcal{O}(n)$-space algorithm for factoring a string into the minimum number of palindromic substrings. That is, given a string $S [1..n]$, in $\mathcal{O}(n \log n)$ time our algorithm returns the minimum number of palindromes $S_1,\ldots, S_\ell$ such that $S = S_1 \cdots S_\ell$. We also show that the time complexity is $\mathcal{O}(n)$ on average and $Ω(n\log n)$ in the worst case. The last result is based on a characterization of the palindromic structure of Zimin words.
△ Less
Submitted 7 August, 2014; v1 submitted 10 March, 2014;
originally announced March 2014.
-
Cyclic Complexity of Words
Authors:
Julien Cassaigne,
Gabriele Fici,
Marinella Sciortino,
Luca Q. Zamboni
Abstract:
We introduce and study a complexity function on words $c_x(n),$ called \emph{cyclic complexity}, which counts the number of conjugacy classes of factors of length $n$ of an infinite word $x.$ We extend the well-known Morse-Hedlund theorem to the setting of cyclic complexity by showing that a word is ultimately periodic if and only if it has bounded cyclic complexity. Unlike most complexity functio…
▽ More
We introduce and study a complexity function on words $c_x(n),$ called \emph{cyclic complexity}, which counts the number of conjugacy classes of factors of length $n$ of an infinite word $x.$ We extend the well-known Morse-Hedlund theorem to the setting of cyclic complexity by showing that a word is ultimately periodic if and only if it has bounded cyclic complexity. Unlike most complexity functions, cyclic complexity distinguishes between Sturmian words of different slopes. We prove that if $x$ is a Sturmian word and $y$ is a word having the same cyclic complexity of $x,$ then up to renaming letters, $x$ and $y$ have the same set of factors. In particular, $y$ is also Sturmian of slope equal to that of $x.$ Since $c_x(n)=1$ for some $n\geq 1$ implies $x$ is periodic, it is natural to consider the quantity $\liminf_{n\rightarrow \infty} c_x(n).$ We show that if $x$ is a Sturmian word, then $\liminf_{n\rightarrow \infty} c_x(n)=2.$ We prove however that this is not a characterization of Sturmian words by exhibiting a restricted class of Toeplitz words, including the period-doubling word, which also verify this same condition on the limit infimum. In contrast we show that, for the Thue-Morse word $t$, $\liminf_{n\rightarrow \infty} c_t(n)=+\infty.$
△ Less
Submitted 28 June, 2016; v1 submitted 24 February, 2014;
originally announced February 2014.
-
On Combinatorial Generation of Prefix Normal Words
Authors:
Péter Burcsi,
Gabriele Fici,
Zsuzsanna Lipták,
Frank Ruskey,
Joe Sawada
Abstract:
A prefix normal word is a binary word with the property that no substring has more 1s than the prefix of the same length. This class of words is important in the context of binary jumbled pattern matching. In this paper we present an efficient algorithm for exhaustively listing the prefix normal words with a fixed length. The algorithm is based on the fact that the language of prefix normal words…
▽ More
A prefix normal word is a binary word with the property that no substring has more 1s than the prefix of the same length. This class of words is important in the context of binary jumbled pattern matching. In this paper we present an efficient algorithm for exhaustively listing the prefix normal words with a fixed length. The algorithm is based on the fact that the language of prefix normal words is a bubble language, a class of binary languages with the property that, for any word w in the language, exchanging the first occurrence of 01 by 10 in w results in another word in the language. We prove that each prefix normal word is produced in O(n) amortized time, and conjecture, based on experimental evidence, that the true amortized running time is O(polylog(n)).
△ Less
Submitted 24 January, 2014;
originally announced January 2014.
-
On the Structure of Bispecial Sturmian Words
Authors:
Gabriele Fici
Abstract:
A balanced word is one in which any two factors of the same length contain the same number of each letter of the alphabet up to one. Finite binary balanced words are called Sturmian words. A Sturmian word is bispecial if it can be extended to the left and to the right with both letters remaining a Sturmian word. There is a deep relation between bispecial Sturmian words and Christoffel words, that…
▽ More
A balanced word is one in which any two factors of the same length contain the same number of each letter of the alphabet up to one. Finite binary balanced words are called Sturmian words. A Sturmian word is bispecial if it can be extended to the left and to the right with both letters remaining a Sturmian word. There is a deep relation between bispecial Sturmian words and Christoffel words, that are the digital approximations of Euclidean segments in the plane. In 1997, J. Berstel and A. de Luca proved that \emph{palindromic} bispecial Sturmian words are precisely the maximal internal factors of \emph{primitive} Christoffel words. We extend this result by showing that bispecial Sturmian words are precisely the maximal internal factors of \emph{all} Christoffel words. Our characterization allows us to give an enumerative formula for bispecial Sturmian words. We also investigate the minimal forbidden words for the language of Sturmian words.
△ Less
Submitted 19 November, 2013;
originally announced November 2013.
-
Open and Closed Prefixes of Sturmian Words
Authors:
Alessandro De Luca,
Gabriele Fici
Abstract:
A word is closed if it contains a proper factor that occurs both as a prefix and as a suffix but does not have internal occurrences, otherwise it is open. We deal with the sequence of open and closed prefixes of Sturmian words and prove that this sequence characterizes every finite or infinite Sturmian word up to isomorphisms of the alphabet. We then characterize the combinatorial structure of the…
▽ More
A word is closed if it contains a proper factor that occurs both as a prefix and as a suffix but does not have internal occurrences, otherwise it is open. We deal with the sequence of open and closed prefixes of Sturmian words and prove that this sequence characterizes every finite or infinite Sturmian word up to isomorphisms of the alphabet. We then characterize the combinatorial structure of the sequence of open and closed prefixes of standard Sturmian words. We prove that every standard Sturmian word, after swapping its first letter, can be written as an infinite product of squares of reversed standard words.
△ Less
Submitted 10 June, 2013;
originally announced June 2013.
-
On the Number of Closed Factors in a Word
Authors:
Golnaz Badkobeh,
Gabriele Fici,
Zsuzsanna Lipták
Abstract:
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…
▽ More
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.
△ Less
Submitted 1 December, 2014; v1 submitted 28 May, 2013;
originally announced May 2013.
-
On the least number of palindromes contained in an infinite word
Authors:
Gabriele Fici,
Luca Q. Zamboni
Abstract:
We investigate the least number of palindromic factors in an infinite word. We first consider general alphabets, and give answers to this problem for periodic and non-periodic words, closed or not under reversal of factors. We then investigate the same problem when the alphabet has size two.
We investigate the least number of palindromic factors in an infinite word. We first consider general alphabets, and give answers to this problem for periodic and non-periodic words, closed or not under reversal of factors. We then investigate the same problem when the alphabet has size two.
△ Less
Submitted 6 February, 2013; v1 submitted 15 January, 2013;
originally announced January 2013.
-
Algorithms for Computing Abelian Periods of Words
Authors:
Gabriele Fici,
Thierry Lecroq,
Arnaud Lefebvre,
Elise Prieur-Gaston
Abstract:
Constantinescu and Ilie (Bulletin EATCS 89, 167--170, 2006) introduced the notion of an \emph{Abelian period} of a word. A word of length $n$ over an alphabet of size $σ$ can have $Θ(n^{2})$ distinct Abelian periods. The Brute-Force algorithm computes all the Abelian periods of a word in time $O(n^2 \times σ)$ using $O(n \times σ)$ space. We present an off-line algorithm based on a $\sel$ function…
▽ More
Constantinescu and Ilie (Bulletin EATCS 89, 167--170, 2006) introduced the notion of an \emph{Abelian period} of a word. A word of length $n$ over an alphabet of size $σ$ can have $Θ(n^{2})$ distinct Abelian periods. The Brute-Force algorithm computes all the Abelian periods of a word in time $O(n^2 \times σ)$ using $O(n \times σ)$ space. We present an off-line algorithm based on a $\sel$ function having the same worst-case theoretical complexity as the Brute-Force one, but outperforming it in practice. We then present on-line algorithms that also enable to compute all the Abelian periods of all the prefixes of $w$.
△ Less
Submitted 10 June, 2013; v1 submitted 22 November, 2012;
originally announced November 2012.
-
Abelian Repetitions in Sturmian Words
Authors:
Gabriele Fici,
Alessio Langiu,
Thierry Lecroq,
Arnaud Lefebvre,
Filippo Mignosi,
Élise Prieur-Gaston
Abstract:
We investigate abelian repetitions in Sturmian words. We exploit a bijection between factors of Sturmian words and subintervals of the unitary segment that allows us to study the periods of abelian repetitions by using classical results of elementary Number Theory. We prove that in any Sturmian word the superior limit of the ratio between the maximal exponent of an abelian repetition of period…
▽ More
We investigate abelian repetitions in Sturmian words. We exploit a bijection between factors of Sturmian words and subintervals of the unitary segment that allows us to study the periods of abelian repetitions by using classical results of elementary Number Theory. We prove that in any Sturmian word the superior limit of the ratio between the maximal exponent of an abelian repetition of period $m$ and $m$ is a number $\geq\sqrt{5}$, and the equality holds for the Fibonacci infinite word. We further prove that the longest prefix of the Fibonacci infinite word that is an abelian repetition of period $F_j$, $j>1$, has length $F_j(F_{j+1}+F_{j-1} +1)-2$ if $j$ is even or $F_j(F_{j+1}+F_{j-1})-2$ if $j$ is odd. This allows us to give an exact formula for the smallest abelian periods of the Fibonacci finite words. More precisely, we prove that for $j\geq 3$, the Fibonacci word $f_j$ has abelian period equal to $F_n$, where $n = \lfloor{j/2}\rfloor$ if $j = 0, 1, 2\mod{4}$, or $n = 1 + \lfloor{j/2}\rfloor$ if $ j = 3\mod{4}$.
△ Less
Submitted 9 May, 2013; v1 submitted 26 September, 2012;
originally announced September 2012.
-
Topological properties of cellular automata on trees
Authors:
Gabriele Fici,
Francesca Fiorenzi
Abstract:
We prove that there do not exist positively expansive cellular automata defined on the full k-ary tree shift (for k>=2). Moreover, we investigate some topological properties of these automata and their relationships, namely permutivity, surjectivity, preinjectivity, right-closingness and openness.
We prove that there do not exist positively expansive cellular automata defined on the full k-ary tree shift (for k>=2). Moreover, we investigate some topological properties of these automata and their relationships, namely permutivity, surjectivity, preinjectivity, right-closingness and openness.
△ Less
Submitted 13 August, 2012;
originally announced August 2012.
-
Binary Jumbled String Matching for Highly Run-Length Compressible Texts
Authors:
Golnaz Badkobeh,
Gabriele Fici,
Steve Kroon,
Zsuzsanna Lipták
Abstract:
The Binary Jumbled String Matching problem is defined as: Given a string $s$ over $\{a,b\}$ of length $n$ and a query $(x,y)$, with $x,y$ non-negative integers, decide whether $s$ has a substring $t$ with exactly $x$ $a$'s and $y$ $b$'s. Previous solutions created an index of size O(n) in a pre-processing step, which was then used to answer queries in constant time. The fastest algorithms for cons…
▽ More
The Binary Jumbled String Matching problem is defined as: Given a string $s$ over $\{a,b\}$ of length $n$ and a query $(x,y)$, with $x,y$ non-negative integers, decide whether $s$ has a substring $t$ with exactly $x$ $a$'s and $y$ $b$'s. Previous solutions created an index of size O(n) in a pre-processing step, which was then used to answer queries in constant time. The fastest algorithms for construction of this index have running time $O(n^2/\log n)$ [Burcsi et al., FUN 2010; Moosa and Rahman, IPL 2010], or $O(n^2/\log^2 n)$ in the word-RAM model [Moosa and Rahman, JDA 2012]. We propose an index constructed directly from the run-length encoding of $s$. The construction time of our index is $O(n+ρ^2\log ρ)$, where O(n) is the time for computing the run-length encoding of $s$ and $ρ$ is the length of this encoding---this is no worse than previous solutions if $ρ= O(n/\log n)$ and better if $ρ= o(n/\log n)$. Our index $L$ can be queried in $O(\log ρ)$ time. While $|L|= O(\min(n, ρ^{2}))$ in the worst case, preliminary investigations have indicated that $|L|$ may often be close to $ρ$. Furthermore, the algorithm for constructing the index is conceptually simple and easy to implement. In an attempt to shed light on the structure and size of our index, we characterize it in terms of the prefix normal forms of $s$ introduced in [Fici and Lipták, DLT 2011].
△ Less
Submitted 31 May, 2013; v1 submitted 12 June, 2012;
originally announced June 2012.
-
A Characterization of Bispecial Sturmian Words
Authors:
Gabriele Fici
Abstract:
A finite Sturmian word w over the alphabet {a,b} is left special (resp. right special) if aw and bw (resp. wa and wb) are both Sturmian words. A bispecial Sturmian word is a Sturmian word that is both left and right special. We show as a main result that bispecial Sturmian words are exactly the maximal internal factors of Christoffel words, that are words coding the digital approximations of segme…
▽ More
A finite Sturmian word w over the alphabet {a,b} is left special (resp. right special) if aw and bw (resp. wa and wb) are both Sturmian words. A bispecial Sturmian word is a Sturmian word that is both left and right special. We show as a main result that bispecial Sturmian words are exactly the maximal internal factors of Christoffel words, that are words coding the digital approximations of segments in the Euclidean plane. This result is an extension of the known relation between central words and primitive Christoffel words. Our characterization allows us to give an enumerative formula for bispecial Sturmian words. We also investigate the minimal forbidden words for the set of Sturmian words.
△ Less
Submitted 18 June, 2012; v1 submitted 7 April, 2012;
originally announced April 2012.
-
Enumeration and Structure of Trapezoidal Words
Authors:
Michelangelo Bucci,
Alessandro De Luca,
Gabriele Fici
Abstract:
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…
▽ More
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 words and that a closed trapezoidal word is a Sturmian palindrome if and only if its longest repeated prefix is a palindrome. We also define a new class of words, \emph{semicentral words}, and show that they are characterized by the property that they can be written as $uxyu$, for a central word $u$ and two different letters $x,y$. Finally, we investigate the prefixes of the Fibonacci word with respect to the property of being open or closed trapezoidal words, and show that the sequence of open and closed prefixes of the Fibonacci word follows the Fibonacci sequence.
△ Less
Submitted 29 October, 2012; v1 submitted 6 March, 2012;
originally announced March 2012.
-
Vertical representation of $C^{\infty}$-words
Authors:
Jean-Marc Fédou,
Gabriele Fici
Abstract:
We present a new framework for dealing with $C^{\infty}$-words, based on their left and right frontiers. This allows us to give a compact representation of them, and to describe the set of $C^{\infty}$-words through an infinite directed acyclic graph $G$. This graph is defined by a map acting on the frontiers of $C^{\infty}$-words. We show that this map can be defined recursively and with no expli…
▽ More
We present a new framework for dealing with $C^{\infty}$-words, based on their left and right frontiers. This allows us to give a compact representation of them, and to describe the set of $C^{\infty}$-words through an infinite directed acyclic graph $G$. This graph is defined by a map acting on the frontiers of $C^{\infty}$-words. We show that this map can be defined recursively and with no explicit references to $C^{\infty}$-words. We then show that some important conjectures on $C^{\infty}$-words follow from analogous statements on the structure of the graph $G$.
△ Less
Submitted 19 December, 2014; v1 submitted 23 February, 2012;
originally announced February 2012.
-
A Classification of Trapezoidal Words
Authors:
Gabriele Fici
Abstract:
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. W…
▽ More
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 to characterize the special factors of Sturmian palindromes. We end with several open problems.
△ Less
Submitted 17 August, 2011;
originally announced August 2011.
-
Algorithms for Jumbled Pattern Matching in Strings
Authors:
Péter Burcsi,
Ferdinando Cicalese,
Gabriele Fici,
Zsuzsanna Lipták
Abstract:
The Parikh vector p(s) of a string s is defined as the vector of multiplicities of the characters. Parikh vector q occurs in s if s has a substring t with p(t)=q. We present two novel algorithms for searching for a query q in a text s. One solves the decision problem over a binary text in constant time, using a linear size index of the text. The second algorithm, for a general finite alphabet, fin…
▽ More
The Parikh vector p(s) of a string s is defined as the vector of multiplicities of the characters. Parikh vector q occurs in s if s has a substring t with p(t)=q. We present two novel algorithms for searching for a query q in a text s. One solves the decision problem over a binary text in constant time, using a linear size index of the text. The second algorithm, for a general finite alphabet, finds all occurrences of a given Parikh vector q and has sub-linear expected time complexity; we present two variants, which both use a linear size index of the text.
△ Less
Submitted 8 February, 2011;
originally announced February 2011.
-
Automata and Differentiable Words
Authors:
Jean-Marc Fédou,
Gabriele Fici
Abstract:
We exhibit the construction of a deterministic automaton that, given k > 0, recognizes the (regular) language of k-differentiable words. Our approach follows a scheme of Crochemore et al. based on minimal forbidden words. We extend this construction to the case of C\infinity-words, i.e., words differentiable arbitrary many times. We thus obtain an infinite automaton for representing the set of C\i…
▽ More
We exhibit the construction of a deterministic automaton that, given k > 0, recognizes the (regular) language of k-differentiable words. Our approach follows a scheme of Crochemore et al. based on minimal forbidden words. We extend this construction to the case of C\infinity-words, i.e., words differentiable arbitrary many times. We thus obtain an infinite automaton for representing the set of C\infinity-words. We derive a classification of C\infinity-words induced by the structure of the automaton. Then, we introduce a new framework for dealing with \infinity-words, based on a three letter alphabet. This allows us to define a compacted version of the automaton, that we use to prove that every C\infinity-word admits a repetition in C\infinity whose length is polynomially bounded.
△ Less
Submitted 5 April, 2012; v1 submitted 4 February, 2011;
originally announced February 2011.