On the cyclic regularities of strings
Oluwole Ajala, Miznah Alshammary, Mai Alzamel, Jia Gao, Costas, Iliopoulos, Jakub Radoszewski, Wojciech Rytter, Bruce Watson

TL;DR
This paper introduces efficient algorithms for computing various cyclic regularities in strings, such as cyclic periodicity, all cyclic periodicity, maximal local cyclic periodicity, and cyclic covers, expanding the computational tools for string analysis.
Contribution
The paper presents new algorithms specifically designed for computing cyclic regularities in strings, addressing gaps in existing methods for these particular properties.
Findings
Algorithms for cyclic periodicity and all cyclic periodicity
Algorithms for maximal local cyclic periodicity and cyclic covers
Enhanced computational efficiency in string regularity analysis
Abstract
Regularities in strings are often related to periods and covers, which have extensively been studied, and algorithms for their efficient computation have broad application. In this paper we concentrate on computing cyclic regularities of strings, in particular, we propose several efficient algorithms for computing: (i) cyclic periodicity; (ii) all cyclic periodicity; (iii) maximal local cyclic periodicity; (iv) cyclic covers.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAlgorithms and Data Compression · Network Packet Processing and Optimization · semigroups and automata theory
11institutetext: Faculty of Natural and Mathematical Sciences, King’s College London, United Kingdom
11email: {oluwole.ajala, miznah.alshammary, mai.alzamel, jia.gao, c.iliopoulos}@kcl.ac.uk 22institutetext: Faculty of Mathematics, Informatics and Mechanics, University of Warsaw, Poland
22email: {jrad, rytter}@mimuw.edu.pl 33institutetext: Faculty of Informatics Science, Stellenbosch University, South Africa
33email: {bwwatson}@sun.ac.za
On the cyclic regularities of strings
Oluwole Ajala 11
Miznah Alshammary 11
Mai Alzamel 11
Jia Gao 11
Costas Iliopoulos 11
Jakub Radoszewski 22
Wojciech Rytter and Bruce Watson 2233
Abstract
Regularities in strings are often related to periods and covers, which have extensively been studied, and algorithms for their efficient computation have broad application. In this paper we concentrate on computing cyclic regularities of strings, in particular, we propose several efficient algorithms for computing: (i) cyclic periodicity; (ii) all cyclic periodicity; (iii) maximal local cyclic periodicity; (iv) cyclic covers.
Keywords:
Cyclic regularities, Periods, Covers
1 Introduction and Related Work
A fundamental concept of repeating patterns or regularities is that of periods (also known as powers). A period of order is defined by a concatenation of identical blocks of symbols. The study of periods can be traced to as far back as the early 1900s with the work of [9], who researched a set of strings that do not contain any substrings that are periods. Periods in diverse forms gained prominence, when they became key structures in computational biology, where they are associated with various regulatory mechanisms and play an important role in genomic fingerprinting [6].
In regularities in strings, one of the most general notions is related to period or power, for instance, given a string of length , a period of a string is a sub string of , if it can be decomposed into equal-length blocks of symbols, such that = , where is a prefix of . However, for simplicity we will discard and only consider .
So far, regularities in strings related with periods and powers, which have been extensively studied, [3] [4] [5] [8] and algorithms for their efficient computation have broad applications. In this paper, we study cyclic factors of strings. The motivation of cyclic factors comes from viruses. The viruses are circular strings, for example Escherichia coli (E.coli) has 154 bases and it is circular [12](Fig. 1). Formally, the viruses break up at any point of the circle, for example, that can appear in the DNA sequence as breaking up at position (Fig. 2). Now, we propose several efficient algorithms for computing: (i) cyclic periodicity; (ii) all cyclic periodicity; (iii) maximal local cyclic periodicity; (iv) cyclic covers.
2 Preliminaries
A string of length over an alphabet of size can be denoted as , where and the - letter of is denoted by . The empty string is the string of length 0. The string is the reverse of string . And , , denotes the contiguous substring (or factor) of letters, such as . A substring is a suffix of , if and a substring is a prefix of , if . Given a cyclic factor of length , , we denote by , for instance, , is one of the following rotations: , , , , . Moreover, we say , .
In this paper, suffix trees are used extensively as computation tools. For a general introduction to suffix trees, see [2],[7],[10], [11].
K-Cyclic Period
Input: Given a string of length , and an integer , compute k-cyclic-period of , where , , , , , , and .
3
Output: k-cyclic-period of
Example 1
Consider a string , where , , , and , . Therefore has a period of length .
Definition 1
A cyclic periodic array of a string of length is defined to be as follows: , , if and only if has cyclic periodicity by a string and there no , with that is a cyclic period of .
Example 2
Consider a string of length , a cyclic periodic array as follows:
Definition 2
We define maximal local -cyclic periodicity of a string ,if a substring is cyclic periodic and is not a substring of another cyclic periodic strings.
Example 3
Consider a string , , and a substring is -cyclic periodic and substring , , is not cyclic periodic, and substring , is not cyclic periodic. Therefore, the substring is maximal local -cyclic periodic in string .
Definition 3
We say that a string of length is cyclic-coverable by a string of length , if and only if, for every position of , the following condition holds , .
Example 4
Consider a string , , , , , is cyclic coverable by a string , for every position of , .
Definition 4
Compute all cyclic covers of a given string , that is for all possible length cyclic covers.
Example 5
Consider a string , then , , , are cyclic covers of .
3 Computing -cyclic periodicity
Theorem 3.1
Given a string of length and an integer , , test whether it is -cyclic periodic; this can be determined in time and space.
Proof
We construct the suffix tree of (see [7], [10], [11]). We let , then let denote the depth of the lowest common ancestor of (see [1]), and . We compute the LCA of and for , and , if for some , then is not -cyclic periodic string. Now consider , compute the the LCA of and . If for all , then is -cyclic periodic. ∎
4 Computing all cyclic periodicities
Theorem 4.1
Given a string of length , test whether it is -cyclic periodicity for all , this can be determined in time and space.
Proof
We apply the algorithm of Theorem 1 for and we test all cyclic periods of length . The construction of the suffix tree of string and is done once costing . The total cost is
[TABLE]
. ∎
Lemma 1
Compute the cyclic period of .
.
Proof
The smallest cyclic-period of is the cyclic-period of . ∎
5 Computing maximal local -cyclic periodicity
Theorem 5.1
We can compute all -cyclic periodicity of in time.
Proof
We apply the algorithm for and in this case, extend it to cyclic periods of length , where = is cyclic periodic and = is not cyclic periodic. Next, we perform this algorithm on string as , where = , again is cyclic periodic and = is not cyclic periodic.
The construction of the suffix tree of string is done once. The total cost is
[TABLE]
. ∎
Lemma 2
Compute maximal local -cyclic periodicity of .
.
Proof
We compute and merge the arrays for and of . That is the maximal local -cyclic periodicity of . ∎
6 Computing -cyclic coverability
Theorem 6.1
Given a string of length and an integer , , test whether it is -cyclic coverable, this can be determined in time and space.
Proof
We compute the suffix tree of string as , and also we compute the suffix tree of string as .
Then we check with each one of , , …, together with the reverse pairs in . This way we build a collection of cyclic covers if there is one.
The construction of the suffix tree costs ; checking of equality costs and there are factors. The total time is . ∎
7 Computing all cyclic coverability
Theorem 7.1
Given a string of length , test whether it is -cyclic coverable for , this can be determined in time and space.
Proof
We apply the algorithm for and we compare all cyclic coverable of length . The construction of the suffix tree of string is done once. The total cost is
[TABLE]
. ∎
Lemma 3
Compute the cyclic coverability of .
.
Proof
The smallest cyclic coverable of is the all the cyclic coveralbe of . ∎
8 Conclusions and open problems
In this paper, we defined -cyclic periodicity, we presented several efficient algorithms for computing: (i) cyclic periodicity; (ii) all cyclic periodicity; (iii) maximal local cyclic periodicity; (iv) cyclic covers.
Future work will be focused on computing the cyclic-periodic array, that is the cyclic periodicity of every prefix of string and computing the cyclic-coverability array, that is testing each prefix of , for cyclic-coverability. Finally, we will extend the cyclic periodicity to cover the case , where = and is a substring of some .
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] Bender, M.A., Farach-Colton, M.: The LCA problem revisited. In: Latin American Symposium on Theoretical Informatics. LNCS, vol. 1776, pp. 88–94. Springer-Verlag (2000)
- 2[2] Crochemore, M., Hancart, C., Lecroq, T.: Algorithms on Strings. Cambridge University Press, New York, NY, USA (2007)
- 3[3] Defant, C.: Anti-power prefixes of the thue-morse word. ar Xiv preprint ar Xiv:1607.05825 (2016)
- 4[4] Erdős, P., et al.: Anti-ramsey theorems (1973)
- 5[5] Fujita, S., Magnant, C., Ozeki, K.: Rainbow generalizations of ramsey theory: a survey. Graphs and Combinatorics 26(1), 1–30 (2010)
- 6[6] Kolpakov, R., Bana, G., Kucherov, G.: mreps: efficient and flexible detection of tandem repeats in dna. Nucleic acids research 31(13), 3672–3678 (2003)
- 7[7] Mc Creight, E.M.: A space-economical suffix tree construction algorithm. Journal of the ACM (JACM) 23(2), 262–272 (1976)
- 8[8] Narayanan, S.: Functions on antipower prefix lengths of the thue-morse word. ar Xiv preprint ar Xiv:1705.06310 (2017)
