-
Bijective BWT based compression schemes
Authors:
Golnaz Badkobeh,
Hideo Bannai,
Dominik Köppl
Abstract:
We investigate properties of the bijective Burrows-Wheeler transform (BBWT). We show that for any string $w$, a bidirectional macro scheme of size $O(r_B)$ can be induced from the BBWT of $w$, where $r_B$ is the number of maximal character runs in the BBWT. We also show that $r_B = O(z\log^2 n)$, where $n$ is the length of $w$ and $z$ is the number of Lempel-Ziv 77 factors of $w$. Then, we show a…
▽ More
We investigate properties of the bijective Burrows-Wheeler transform (BBWT). We show that for any string $w$, a bidirectional macro scheme of size $O(r_B)$ can be induced from the BBWT of $w$, where $r_B$ is the number of maximal character runs in the BBWT. We also show that $r_B = O(z\log^2 n)$, where $n$ is the length of $w$ and $z$ is the number of Lempel-Ziv 77 factors of $w$. Then, we show a separation between BBWT and BWT by a family of strings with $r_B = Ω(\log n)$ but having only $r=2$ maximal character runs in the standard Burrows--Wheeler transform (BWT). However, we observe that the smallest $r_B$ among all cyclic rotations of $w$ is always at most $r$. While an $o(n^2)$ algorithm for computing an optimal rotation giving the smallest $r_B$ is still open, we show how to compute the Lyndon factorizations -- a component for computing BBWT -- of all cyclic rotations in $O(n)$ time. Furthermore, we conjecture that we can transform two strings having the same Parikh vector to each other by BBWT and rotation operations, and prove this conjecture for the case of binary alphabets and permutations.
△ Less
Submitted 19 August, 2024; v1 submitted 24 June, 2024;
originally announced June 2024.
-
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.
-
Internal Shortest Absent Word Queries in Constant Time and Linear Space
Authors:
Golnaz Badkobeh,
Panagiotis Charalampopoulos,
Dmitry Kosolobov,
Solon P. Pissis
Abstract:
Given a string $T$ of length $n$ over an alphabet $Σ\subset \{1,2,\ldots,n^{O(1)}\}$ of size $σ$, we are to preprocess $T$ so that given a range $[i,j]$, we can return a representation of a shortest string over $Σ$ that is absent in the fragment $T[i]\cdots T[j]$ of $T$. We present an $O(n)$-space data structure that answers such queries in constant time and can be constructed in $O(n\log_σn)$ tim…
▽ More
Given a string $T$ of length $n$ over an alphabet $Σ\subset \{1,2,\ldots,n^{O(1)}\}$ of size $σ$, we are to preprocess $T$ so that given a range $[i,j]$, we can return a representation of a shortest string over $Σ$ that is absent in the fragment $T[i]\cdots T[j]$ of $T$. We present an $O(n)$-space data structure that answers such queries in constant time and can be constructed in $O(n\log_σn)$ time.
△ Less
Submitted 3 June, 2021;
originally announced June 2021.
-
Left Lyndon tree construction
Authors:
Golnaz Badkobeh,
Maxime Crochemore
Abstract:
We extend the left-to-right Lyndon factorisation of a word to the left Lyndon tree construction of a Lyndon word. It yields an algorithm to sort the prefixes of a Lyndon word according to the infinite ordering defined by Dolce et al. (2019). A straightforward variant computes the left Lyndon forest of a word. All algorithms run in linear time on a general alphabet, that is, in the letter-compariso…
▽ More
We extend the left-to-right Lyndon factorisation of a word to the left Lyndon tree construction of a Lyndon word. It yields an algorithm to sort the prefixes of a Lyndon word according to the infinite ordering defined by Dolce et al. (2019). A straightforward variant computes the left Lyndon forest of a word. All algorithms run in linear time on a general alphabet, that is, in the letter-comparison model.
△ Less
Submitted 25 November, 2020;
originally announced November 2020.
-
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.
-
Avoiding conjugacy classes on the 5-letter alphabet
Authors:
Golnaz Badkobeh,
Pascal Ochem
Abstract:
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 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]
△ Less
Submitted 20 November, 2018;
originally announced November 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.
-
On Two LZ78-style Grammars: Compression Bounds and Compressed-Space Computation
Authors:
Golnaz Badkobeh,
Travis Gagie,
Shunsuke Inenaga,
Tomasz Kociumaka,
Dmitry Kosolobov,
Simon J. Puglisi
Abstract:
We investigate two closely related LZ78-based compression schemes: LZMW (an old scheme by Miller and Wegman) and LZD (a recent variant by Goto et al.). Both LZD and LZMW naturally produce a grammar for a string of length $n$; we show that the size of this grammar can be larger than the size of the smallest grammar by a factor $Ω(n^{\frac{1}3})$ but is always within a factor…
▽ More
We investigate two closely related LZ78-based compression schemes: LZMW (an old scheme by Miller and Wegman) and LZD (a recent variant by Goto et al.). Both LZD and LZMW naturally produce a grammar for a string of length $n$; we show that the size of this grammar can be larger than the size of the smallest grammar by a factor $Ω(n^{\frac{1}3})$ but is always within a factor $O((\frac{n}{\log n})^{\frac{2}{3}})$. In addition, we show that the standard algorithms using $Θ(z)$ working space to construct the LZD and LZMW parsings, where $z$ is the size of the parsing, work in $Ω(n^{\frac{5}4})$ time in the worst case. We then describe a new Las Vegas LZD/LZMW parsing algorithm that uses $O (z \log n)$ space and $O(n + z \log^2 n)$ time w.h.p..
△ Less
Submitted 25 July, 2017; v1 submitted 26 May, 2017;
originally announced May 2017.
-
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.
-
Fewest repetitions in infinite binary words
Authors:
Golnaz Badkobeh,
Maxime Crochemore
Abstract:
A square is the concatenation of a nonempty word with itself. A word has period p if its letters at distance p match. The exponent of a nonempty word is the quotient of its length over its smallest period.
In this article we give a proof of the fact that there exists an infinite binary word which contains finitely many squares and simultaneously avoids words of exponent larger than 7/3. Our infi…
▽ More
A square is the concatenation of a nonempty word with itself. A word has period p if its letters at distance p match. The exponent of a nonempty word is the quotient of its length over its smallest period.
In this article we give a proof of the fact that there exists an infinite binary word which contains finitely many squares and simultaneously avoids words of exponent larger than 7/3. Our infinite word contains 12 squares, which is the smallest possible number of squares to get the property, and 2 factors of exponent 7/3. These are the only factors of exponent larger than 2. The value 7/3 introduces what we call the finite-repetition threshold of the binary alphabet. We conjecture it is 7/4 for the ternary alphabet, like its repetitive threshold.
△ Less
Submitted 24 July, 2012;
originally announced July 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.
-
Finite-Repetition threshold for infinite ternary words
Authors:
Golnaz Badkobeh,
Maxime Crochemore
Abstract:
The exponent of a word is the ratio of its length over its smallest period. The repetitive threshold r(a) of an a-letter alphabet is the smallest rational number for which there exists an infinite word whose finite factors have exponent at most r(a). This notion was introduced in 1972 by Dejean who gave the exact values of r(a) for every alphabet size a as it has been eventually proved in 2009.…
▽ More
The exponent of a word is the ratio of its length over its smallest period. The repetitive threshold r(a) of an a-letter alphabet is the smallest rational number for which there exists an infinite word whose finite factors have exponent at most r(a). This notion was introduced in 1972 by Dejean who gave the exact values of r(a) for every alphabet size a as it has been eventually proved in 2009.
The finite-repetition threshold for an a-letter alphabet refines the above notion. It is the smallest rational number FRt(a) for which there exists an infinite word whose finite factors have exponent at most FRt(a) and that contains a finite number of factors with exponent r(a). It is known from Shallit (2008) that FRt(2)=7/3.
With each finite-repetition threshold is associated the smallest number of r(a)-exponent factors that can be found in the corresponding infinite word. It has been proved by Badkobeh and Crochemore (2010) that this number is 12 for infinite binary words whose maximal exponent is 7/3.
We show that FRt(3)=r(3)=7/4 and that the bound is achieved with an infinite word containing only two 7/4-exponent words, the smallest number.
Based on deep experiments we conjecture that FRt(4)=r(4)=7/5. The question remains open for alphabets with more than four letters.
Keywords: combinatorics on words, repetition, repeat, word powers, word exponent, repetition threshold, pattern avoidability, word morphisms.
△ Less
Submitted 17 August, 2011;
originally announced August 2011.