Covers in Optimal Space
Abstract
A cover of a string is a string such that every index of is contained in some occurrence of . First introduced by Apostolico and Ehrenfeucht [TCS’93] over 30 years ago, covers have since received significant attention in the string algorithms community. In this work, we present a space-efficient algorithm for computing a compact representation of all covers of a given string. Our algorithm requires only additional memory while accessing the input string of length in a read-only manner. Moreover, it runs in time, matching the best-known time complexity for this problem while achieving an exponential improvement in space usage.
Keywords and phrases:
Cover, Read-only random access, small spaceCopyright and License:
2012 ACM Subject Classification:
Theory of computation Design and analysis of algorithmsFunding:
This research was supported by Israel Science Foundation grant 810/21.Editors:
Paola Bonizzoni and Veli MäkinenSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
A cover of a string is a substring of such that every index in is covered by some occurrence of . The definition of covers was first introduced by Apostolico and Ehrenfeucht [2], where they also present an time algorithm that reports all maximal substrings of an input string of length that have a non-trivial cover. In particular, the algorithm of [2] decides whether has a non-trivial cover. In 1991, Apostolico, Farach and Iliopoulos [3] introduce the first -time algorithm that computes the shortest cover of . Breslauer [8] generalizes the result and shows how to compute the shortest cover for every prefix of in linear time. Finally, Moore and Smyth [28, 29] introduce an time algorithm that returns all covers of . In a very recent work, Radoszewski and Zuba [32] show how to obtain a sub-linear time algorithm when the string is over a sub polynomial alphabet and is given in packed representation.
The time complexity of computing all covers of a string has been thoroughly studied, with optimal algorithms well established. This motivates us to shift our focus to space complexity, where significant questions remain. Our goal is to explore the fundamental limits of space efficiency and develop algorithms that minimize memory usage while maintaining optimal running time. In particular, we consider the classical model of read-only random access model. In this model, random access to the input is allowed, and the goal is to design a well-performing algorithm that uses a small, typically sub-linear, amount of working space. The study of space efficient string algorithms in the read-only random access model has given rise to many interesting results throughout the years. A partial list of fundamental string problems that have been studied in the read-only random access model include Pattern Matching [15, 13], Lempel-Ziv Factorization [20], Longest Increasing Substring [21], Longest Common Extension Data Structure [6, 25], Longest Common Substring [5] and Internal Pattern Matching [4].
In this work, we study space-efficient computation of all the covers of an input string of length over a polynomial alphabet, given in read-only memory. We introduce an algorithm that computes an size representation of all covers of using space. The running time of our algorithm is , matching the running time of the state of the art algorithm for polynomial alphabet [29], which inherently uses linear space. As a subroutine, we also develop an algorithm with the same complexities for computing all the borders of an input string. Our main result is stated in the following theorem.
Theorem 1.
There exists an algorithm that given a string of length in read-only memory, outputs a representation of by arithmetic progressions. The algorithm runs in time and uses working space.
In Section 6 we justify the space complexity by showing that any representation of the covers of a strings requires machine words for some string of length for a sufficiently large .
Related work.
Covers have been investigated in many computational settings and numerous variations have been introduced (for a comprehensive recent survey, see Mhaskar and Smyth [27]). As previously mentioned, the best algorithm for computing all covers of an input string over general alphabet is by Moore and Smyth [28, 29], who presented an time algorithm. Li and Smyth [26] consider the more general problem of computing the longest cover of each prefix of , providing an time algorithm for this problem. Crochemore et al. [12] considered the problem of constructing an efficient data structure reporting the shortest cover or all covers of a query substring. That is, they show how to preprocess a string in time to construct an -space data structure that can report the shortest cover of an input substring in time.
The study of covers has led to the introduction of numerous variations and generalizations. A -cover of ([18, 33]) is a pair of strings, such that every index in is covered either by an occurrence of or by an occurrence of . This can be generalized for a -cover, which is a set of strings that, together, cover every index in . While computing all -covers of a string is NP-complete for general ([11]), efficient algorithms have been recently introduced for computing -covers ([31, 7]). Charalampopoulos et al. [10] introduced natural notions of covers in 2-dimensional strings, and provided efficient algorithms to compute all such covers of an input 2-dimensional string. Other variations of covers that were introduced and studied are enhanced covers [14], approximate covers [1], Cyclic Covers [16, 19], and Tree Covers [30, 24].
2 Preliminaries
Integer Notations.
We use bracket notation to denote consecutive sets of integers, i.e. for two integers we denote . For a positive integer , we denote . An arithmetic progression of integers is a set defined by a triplet of the first element, the difference between elements and the number of elements. We denote it by .
Strings.
A string of length is a sequence of symbols over some alphabet . For , is a substring of . If it is a prefix, and if it is a suffix. A string that appears in both as a prefix and as a suffix is called a border. A positive integer is called a period of if for every . The minimal period of is called the period of . We say that is periodic, if the period of is at most .
For two strings and of lengths and , we say that occurs at index of if . We call the index an occurrence of in . For an index , we say that is covered by a string of length if there is an occurrence of in . If every index in in is covered by , we say that is a cover of .
Each prefix can be uniquely represented by its length . We say that is a border-length if is a border of and cover-length if is a cover of . similarly . Since every cover must cover index , it must be a prefix of , and since it must cover index , it must also be a suffix of . Therefore, every cover is a border, i.e .
Read-Only Random Access Model.
We assume that the input string is given in a read-only format, meaning the algorithm can query in constant time but cannot modify the string. In this model, the input string does not occupy space explicitly, allowing for algorithms with sublinear space complexity. Therefore, the space complexity of the algorithm consists of the working space of the algorithm and of the space dedicated to writing the output. Our algorithm operates in the word RAM model under the standard assumption that both an index from and a symbol from fit within a single machine word.
As a subroutine, our algorithm uses a pattern matching algorithm that uses space [15]. The algorithm is formally stated in the following lemma.
Lemma 2.
There exists an algorithm that, given a text and a pattern stored in read-only memory, reports all occurrences of in sequentially in time while using only working space. Moreover, the algorithm is online, meaning that it processes each character of in time and determines whether the suffix of up to that character forms an occurrence of .
Useful facts.
Here are several known facts that are useful in our algorithms.
Fact 3 ([9, see Lemma 3.1]).
Let and be two strings. If then all the occurrences of in form an arithmetic progression. Moreover, if there are more than two occurrences of in then the difference of the arithmetic progression is the period of .
Fact 4 (Folklore).
Let and be two strings and let be the period of . Let be two different occurrences of in , then we must have .
Fact 5 ([28, Lemma 2]).
Let be a string with cover . Then, every string with is a cover of if and only if is a cover of .
Fact 6 ([8, Fact 1.3]).
Let be a string with a border and let be a cover of with . Then, is a cover of .
Fact 7 (cf. [7, Lemma 8]).
Let be a string with a cover such that has a period length . Then, is also a cover of .
3 Reporting All Borders
In this section we present an algorithm that computes a representation of in time, using space. It is well known that can be represented by arithmetic progressions [22, 17, 23], and we follow this idea. However, we focus on a special arithmetic progression which we call generating arithmetic progression of border-lengths.
Definition 8.
Let be a string. We say that is a generating arithmetic progression if and for every the period length of is .
The following lemma introduces a partition of all borders into generating arithmetic progressions and an optimal algorithm that computes these generating arithmetic progressions in time, using only working space.
Lemma 9.
Let be a string. The interval can be partitioned into sub-intervals , and let such that the following properties hold:
-
1.
For every , the set is a generating arithmetic progression and we denote .
-
2.
Let and be the minimum elements in two different intervals such that . Then, .
Moreover, there exists an algorithm that given in read-only memory outputs the partition and the arithmetic progressions. The algorithm takes time and uses working space.
In order to prove Lemma 9 we first consider a sub-interval of of the form and show that all border-lengths in such an interval forms a single generating arithmetic progression. Moreover, this arithmetic progression can be found in linear time and constant working space.
Lemma 10.
There exists an algorithm that, given a string of length stored in read-only memory and an integer , outputs a triplet such that , or if . Moreover, is a generating arithmetic progression. The algorithm runs in time and uses working space.
Proof.
For every the border starts with and implies an occurrence of at position . Thus, the algorithm starts by finding all the occurrences of in , using Lemma 2. If there are no such occurrences, we conclude that is empty. Otherwise, we distinguish between two cases. If there is a single occurrence of in , the algorithm is trying to extend this occurrence to a border. Namely, if , the algorithm checks whether by straightforward characters comparisons. Notice that since in this case there is a single occurrence, the time required for all those comparisons is . In this case, the algorithm outputs , and if it discovers that is a border, or returns otherwise.
In case where there are multiple occurrences of , we exploit periodicity as follows. If there are at least two occurrences of in , all the occurrences form an arithmetic progression. This claim is obvious if there are exactly two occurrences and follows from Fact 3 if there are at least three occurrences. This allows us to represent all the occurrences reported by Lemma 2 in space (creating the arithmetic progression when the second occurrence is reported and extending the arithmetic progression with every additional occurrence). Denote by the set of indices such that occurs in . Due to the occurrences of , it must be that the period length of is exactly . The algorithm finds where this period breaks both in the prefix and in the suffix, as follows. In the prefix, let be the smallest index where , if such does not exists . For the suffix, recall that is periodic with period . The algorithm finds the smallest index such that , if such an index does not exist, .
If , then every such that is a border of if and only if . Thus, the set of borders is an arithmetic progression, which can be computed in constant time from (it is ). Notice that in this case, we have indeed that is the period length of every element except maybe for . Clearly we also have . Thus, we indeed obtain a generating arithmetic progression.
If and , there are no borders whose length is some because for any the prefix of length has period-length , while the suffix of length does not have period-length .
Finally, if this means that is not a period of . In this case, if , we have only one candidate which is . This is because is only length allowing the position of the first violation of the period to be both at offset from the beginning and at offset from the end of the border.
If the algorithm concludes that there is no border whose length is in . Otherwise, the algorithm checks whether is indeed a border, by performing comparisons. To see why is the only candidate for a border, notice that is the only position where the first violation of period of the prefix and suffix match each other.
The running time of the algorithm is (both for the pattern matching algorithm of Lemma 2, for verifying candidates and for finding and ). The space usage of the algorithm is .
We are now ready to prove Lemma 9.
Proof of Lemma 9.
To obtain Lemma 9 we consider a partition of the border-lengths into exponential intervals of the form . We are using the algorithm of Lemma 10 for every which is a power of , from to to obtain arithmetic progressions. It only remains to prove that the third property of Lemma 9 holds. That is, if and are the minimum elements in two different intervals such that then, . If and such that the claim follows immediately. Thus, we need to prove that the claim holds for two consecutive intervals and . Let and . Assume to the contrary that . Let since is a border of we have that has period . Since is a prefix of , is also a period length of and it holds that . By Fact 7, it must be that is also a cover of . However, since and we get that which implies that is in and is smaller than . This contradicts being minimum in . Finally, the time complexity of the algorithm is . The algorithm uses space per each call to Lemma 10 and reuses the space on each call, for a total of space. Storing the intervals and the arithmetic progression representation of ’s requires space.
4 Warm Up - Reporting All Covers in Time
As a warm up, we show how to report all covers in time, which we later improve in Section 5 to an -time algorithm. The main idea of our algorithm is to process separately each arithmetic progression of border-lengths reported by Lemma 9. We will show that for a given arithmetic progression of border-lengths, with minimum length , difference and elements, the set of cover-lengths among those borders is a (possibly empty) prefix of the set, i.e. it is either an empty set or an arithmetic progression starting with , with difference and elements i.e., . Moreover, we will show that we can compute , the number of elements in , in time. We first show that if there exists some cover-length in the set , then every smaller in the is also a cover-length.
Lemma 11.
Consider a generating arithmetic progression and let . If is a cover of then for every with we have is also a cover of .
Proof.
Recall that is a generating arithmetic progression, for every we have and that is the period length of . By Fact 5 it is enough to show that covers . By definition of arithmetic progression, there exists two non-negative integers such that and . It is easy to see that for every (where is the number of elements in the arithmetic progression) is a cover of . This is because by being the period of , we have that is a border of and that . Therefore, every index of is covered either by the prefix, or by the suffix occurrence of . Thus, by a simple induction we get that covers , as required.
The following corollary follows immediately from Lemma 11.
Corollary 12.
Let be a generating arithmetic progression. The set of border-lengths from that their corresponding borders covers is for some integer .
Thus, to find all the cover-lengths in a given arithmetic progression, the algorithm first verifies whether covers , which implies whether or not . In the following simple lemma, we show that such a verification can be done in time using working space.
Lemma 13.
Given a length there exists an algorithm that decides whether covers in time, using working space.
Proof.
The algorithm uses - the pattern matching algorithm of Lemma 2 with as the text and as the pattern. Recall, that this algorithm is a real-time algorithm that outputs all the occurrences of in from left to right. At any moment, the algorithm maintains the position of the last occurrence. If at some point there are consecutive characters without any occurrence of or if is not a suffix of , the algorithm halts and reports that does not cover . Otherwise, the algorithm reports is a cover of . The complexities of the algorithm are dominated by the algorithm of Lemma 2, and are as stated. The correctness of the algorithm follows from the definition of a cover.
In case is indeed a cover of , it remains to find - the number of elements in , the arithmetic progression of covers (see Corollary 12). In the following lemma, we show how to do it in time and working space.
Lemma 14.
There exists an algorithm such that its input is a string in read-only memory and a generating arithmetic progression . The algorithm outputs such that the border-lengths of which are also cover-lengths are exactly . The algorithm uses space and runs in time.
Proof.
The algorithm first determines whether and cover , using Lemma 13. If one of them does not cover , the answer is simple by Corollary 12 (it is if is not a cover and if it is a cover and is not a cover). The algorithm finds all occurrences of in one after the other. The algorithm partitions the occurrences into maximal (non-overlapping) arithmetic progressions with a difference of exactly , and maintains the shortest maximal arithmetic progression of occurrences. Let denote the number of occurrences in the shortest arithmetic progression. Then, the algorithm returns as . See Algorithm 1.
Complexities.
Since uses space and takes time per character, the algorithm uses working space and runs in time.
Correctness.
If is not a cover of , clearly, , and the algorithm reports the correct answer. Similarly, if is a cover and is not a cover then by Lemma 11 and the algorithm reports the right value.
Let us consider the case where is a cover of . Let and let . We have to prove that . Let be the maximum element in such that covers .
Since is a generating arithmetic progression, the period of is . Therefore, due to Fact 4, when the algorithm find that the next occurrence is not at difference from the previous one, it is at difference strictly more than . Algorithm 1 essentially iterates these arithmetic progressions, and keeps track on the shortest arithmetic progression encountered throughout the iteration as . It follows that there is an index such that:
-
1.
For every there is an occurrence of at index .
-
2.
Both and are not occurrences of .
We start by showing that . Assume to the contrary that . Since is a cover, it must hold that an occurrence of covers the index , say at index . Since is in particular an occurrence of , and is also an occurrence of , Fact 4 implies that either or . If , then, we have that has period , which together with the fact that has period implies that , a contradiction to not being an occurrence of . If , we have that there are consecutive occurrences of following , a contradiction to not being an occurrence of .
We proceed to show that is a cover of , which implies that . Let be an index. Since is a cover of , is covered by some occurrence of at index . Let be the value of after Algorithm 1 iterated the occurrence . By the definition of , we know that there is an occurrence of at index for every . We also know that throughout the following iterations of the algorithm, the value of will increase to at least before being reset to . Therefore, there are occurrences of in for every as well. In conclusion, for , there are occurrences of in for every which means that there is an occurrence of at index containing all of these occurrences. In particular, this occurrence of covers the occurrence of that covers , which means that covers .
To conclude this section, one can use Lemmas 9 and 14 to output all covers of in time and space, by first obtaining the arithmetic progressions from Lemma 9 and then apply Lemma 14 on each one of them. In Section 5 we will show how to reduce the running time of finding all covers to while preserving working space.
5 Linear Time Algorithm
In this section, we introduce an improved algorithm that computes all covers of with space and takes only time.
Sequence of First elements.
Let be the arithmetic progressions that Lemma 9 outputs. Their union forms , ordered by increasing value of first element. Let be the sequence of elements, such that is the first element in . In addition, let be the length of . Recall that by Lemma 9 we have for every and that . We denote .
We introduce a recursive algorithm that finds for a given the largest such that is a cover of . In particular, when applying the algorithm with the output is the largest such that covers . Later in Section 5.1 we will use this lemma to find and report all covers-lengths of .
Lemma 15.
There exists an algorithm that given in read-only memory and the sequence , for a given computes the largest such that is a proper cover of , or if there is no such . The algorithm runs in time and uses space.
Proof.
(See Algorithm 2.) We first consider the base case, where , in this case there is no value , and the algorithm returns .
Now, we consider the general case where . The algorithm runs in iterations, checking a candidate in each iteration (starting from ) to determine whether covers . At the end of each iteration, the algorithm either finds that indeed covers , or identifies the largest prefix of that is covered by . The next candidate is the largest such that covers , which is retrieved via a recursive call. In the next iteration, the algorithm does not need to verify that covers , since it follows from the fact that covers and covers by Fact 5. Thus, the algorithm proceeds to the next iteration, starting to verify that covers from position . We note that the verification starts at and not at position , since position can be covered by occurrences of in the interval . If the verification fails, we are again in a situation where a maximal prefix covered by was found.
In each iteration, to determine the largest prefix covered by the current candidate , the algorithm employs the algorithm from Lemma 2. We utilize the fact that is a real-time algorithm to halt the algorithm the moment we recognize the largest prefix covered by the current candidate border. This way, the running time of the algorithm is linear in the length of the candidate and the progress we made in covering .
Correctness.
We prove correctness by induction on . The base case follows immediately. Assume that the algorithm is correct for all , and we prove that it is also correct for . We consider the iterations of the while loop (Line 4) and show that at the beginning of each iteration, the following property holds.
Claim 16.
At the beginning of every iteration, is covered by .
Proof.
We prove the claim by induction on the iterations. At the beginning of the first iteration, implies is trivially covered by . Assuming the property holds at the beginning of some iteration, we should prove it holds at the end of the iteration as well. Let and be the values of and , at the beginning and end of the iteration, respectively. During the iteration, is set such that is the largest prefix of covered by . By the induction hypothesis also covers . Thus, is covered by . Finally , implying (by induction hypothesis regarding the correctness of ) that also covers , by Fact 5, as required. Due to Claim 16, at the beginning of each iteration covers . By running the pattern matching algorithm of Lemma 2 from position we guarantee that all occurrences of that can be used to cover position are found. Thus, at Line 6, the algorithm assigns to the largest prefix of that is covered by . In particular, for the value reported by the algorithm indeed covers .
Space complexity.
The space usage of the algorithm in every level of the recursion is clearly . Every recursive call has different integer . Thus, there are levels of recursion, and the total space usage of the algorithm is space.
Time complexity.
We prove by induction that the time complexity is . For the algorithm runs in time. Let us assume that the running time for every is , and we prove that the running time for is . Let and be the values of and , respectively at the beginning of the th iteration (Line 4), and let be the value of at the end of the th iteration. The runtime of Line 5 is . The runtime of Line 9 is by the induction hypothesis. All other lines of the loop take time. Thus, the th iteration costs time. Summing over all iterations, the term sums up to and the sum of is bounded by , since for every we have . Thus, the algorithm runs in time, as required.
5.1 Reporting All Covers
Recall that is the sequence of all the first elements in the arithmetic progressions of Lemma 9, appended with . The algorithm that reports all covers has two phases. In the first phase, the algorithm finds the subset of of border-lengths which are also cover-lengths, denoted as . Then, the algorithm computes for every with the arithmetic progression , where is the arithmetic progression of borders with minimum element . A naïve implementation of this approach would cost time, since the the computation of with the algorithm of Lemma 14 takes time per arithmetic progression. The key idea for improvement, is that by Fact 5 if and are two consecutive cover-lengths in , to extend it is enough to make sure the extension covers , and we do not need to compute the extension with respect to the complete string . Thus, the costs for each computation of is proportional to the successor cover in , which implies a geometric sequence of costs that sums up to time.
Lemma 17.
There exists an algorithm that given in read-only memory and , computes in time, using space.
Proof.
The algorithm starts by finding , the maximum cover-length in by Lemma 15 with . Then, as long as the last found value is not , the algorithm uses Lemma 15 with to find the longest cover-length of which is smaller than .
Correctness.
In the first iteration of the loop the algorithm clearly finds the maximum length such that covers , hence finds . In general, in the th iteration, the algorithm appends the largest (among the covers in ) cover of the cover found in the th iteration. By Fact 5, this is exactly the next largest cover of in . Thus, at the end the algorithm returns all cover-lengths of in , that is .
Comlexities.
The space usage of the algorithm is dominated by the sizes of and , which are both space. The time for every iteration of the loop is by Lemma 15. Thus, in total the running time .
See 1
Proof.
The algorithm first applies Lemma 9 and computes to be the increasing sequence of first elements in the arithmetic progressions. Then, the algorithm applies Lemma 17 to obtain (and let us artificially denote ). For every , the algorithm uses Lemma 14 with the string and the arithmetic progression of to find such that . The algorithm returns all arithmetic progressions found in this process.
Correctness.
Complexities.
6 Lower Bound on Representation Size of
To complement our result we establish the claim that any representation of the set of cover lengths of a string of length must take words of space, that is bits.
Lemma 18.
For an integer , let . Then .
Lemma 18 indicates that any algorithm using machine words (i.e. bits) on inputs with length , necessarily returns the same output for some pair of strings , with , for a sufficiently large . Hence, the algorithm of Theorem 1 is optimal in this model.
Proof.
Let be set of arrays of size with each entry being a number in . Clearly, . We prove the statement by showing an injection from to .
Let . We construct a string corresponding to as follows. . For every we define . Finally, we define .
By the construction for every we have . Since and we get by simple induction that .
Notice that for every , the string starts and ends with . It follows that is both a prefix and a suffix of of length at least . As a consequence, is a cover of . Therefore, by Fact 5 we have that for every we have . We next show how to recover all lengths of s from .
Claim 19.
For every .
Proof.
Recall that and covers . Assume by contradiction that there is another cover length . It follows that one of , is a border of the other with length difference at most from each other. It is well known [8, Fact 1.1] that a string with border-length has period length , which indicates that is periodic with period less than . This is a contradiction as the prefix of has for any . We now show that the mapping of to is indeed an injection. Let and be two different arrays in . Let be the smallest index where . It is clear by the construction that and therefore . Since both and are in , by Claim 19 it must be that .
References
- [1] Amihood Amir, Avivit Levy, Ronit Lubin, and Ely Porat. Approximate cover of strings. Theor. Comput. Sci., 793:59–69, 2019. doi:10.1016/J.TCS.2019.05.020.
- [2] Alberto Apostolico and Andrzej Ehrenfeucht. Efficient detection of quasiperiodicities in strings. Theor. Comput. Sci., 119(2):247–265, 1993. doi:10.1016/0304-3975(93)90159-Q.
- [3] Alberto Apostolico, Martin Farach, and Costas S. Iliopoulos. Optimal superprimitivity testing for strings. Inf. Process. Lett., 39(1):17–20, 1991. doi:10.1016/0020-0190(91)90056-N.
- [4] Gabriel Bathie, Panagiotis Charalampopoulos, and Tatiana Starikovskaya. Internal pattern matching in small space and applications. In Shunsuke Inenaga and Simon J. Puglisi, editors, 35th Annual Symposium on Combinatorial Pattern Matching, CPM 2024, June 25-27, 2024, Fukuoka, Japan, volume 296 of LIPIcs, pages 4:1–4:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.CPM.2024.4.
- [5] Stav Ben-Nun, Shay Golan, Tomasz Kociumaka, and Matan Kraus. Time-space tradeoffs for finding a long common substring. In Inge Li Gørtz and Oren Weimann, editors, 31st Annual Symposium on Combinatorial Pattern Matching, CPM 2020, June 17-19, 2020, Copenhagen, Denmark, volume 161 of LIPIcs, pages 5:1–5:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPICS.CPM.2020.5.
- [6] Or Birenzwige, Shay Golan, and Ely Porat. Locally consistent parsing for text indexing in small space. In Shuchi Chawla, editor, Proceedings of the 2020 ACM-SIAM Symposium on Discrete Algorithms, SODA 2020, Salt Lake City, UT, USA, January 5-8, 2020, pages 607–626. SIAM, 2020. doi:10.1137/1.9781611975994.37.
- [7] Itai Boneh, Shay Golan, and Arseny M. Shur. String 2-covers with no length restrictions. In Timothy M. Chan, Johannes Fischer, John Iacono, and Grzegorz Herman, editors, 32nd Annual European Symposium on Algorithms, ESA 2024, September 2-4, 2024, Royal Holloway, London, United Kingdom, volume 308 of LIPIcs, pages 31:1–31:18. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.ESA.2024.31.
- [8] Dany Breslauer. An on-line string superprimitivity test. Inf. Process. Lett., 44(6):345–347, 1992. doi:10.1016/0020-0190(92)90111-8.
- [9] Dany Breslauer and Zvi Galil. Real-time streaming string-matching. In Raffaele Giancarlo and Giovanni Manzini, editors, Combinatorial Pattern Matching - 22nd Annual Symposium, CPM 2011, Palermo, Italy, June 27-29, 2011. Proceedings, volume 6661 of Lecture Notes in Computer Science, pages 162–172. Springer, 2011. doi:10.1007/978-3-642-21458-5_15.
- [10] Panagiotis Charalampopoulos, Jakub Radoszewski, Wojciech Rytter, Tomasz Walen, and Wiktor Zuba. Computing covers of 2d-strings. In Pawel Gawrychowski and Tatiana Starikovskaya, editors, 32nd Annual Symposium on Combinatorial Pattern Matching, CPM 2021, July 5-7, 2021, Wrocław, Poland, volume 191 of LIPIcs, pages 12:1–12:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2021. doi:10.4230/LIPICS.CPM.2021.12.
- [11] Richard Cole, Costas S. Iliopoulos, Manal Mohamed, William F. Smyth, and Lu Yang. The complexity of the minimum k-cover problem. J. Autom. Lang. Comb., 10(5/6):641–653, 2005. doi:10.25596/JALC-2005-641.
- [12] Maxime Crochemore, Costas S. Iliopoulos, Jakub Radoszewski, Wojciech Rytter, Juliusz Straszynski, Tomasz Walen, and Wiktor Zuba. Internal quasiperiod queries. In Christina Boucher and Sharma V. Thankachan, editors, String Processing and Information Retrieval - 27th International Symposium, SPIRE 2020, Orlando, FL, USA, October 13-15, 2020, Proceedings, volume 12303 of Lecture Notes in Computer Science, pages 60–75. Springer, 2020. doi:10.1007/978-3-030-59212-7_5.
- [13] Maxime Crochemore and Dominique Perrin. Two-way string matching. J. ACM, 38(3):651–675, 1991. doi:10.1145/116825.116845.
- [14] Tomás Flouri, Costas S. Iliopoulos, Tomasz Kociumaka, Solon P. Pissis, Simon J. Puglisi, W. F. Smyth, and Wojciech Tyczynski. Enhanced string covering. Theor. Comput. Sci., 506:102–114, 2013. doi:10.1016/J.TCS.2013.08.013.
- [15] Zvi Galil and Joel I. Seiferas. Time-space-optimal string matching. J. Comput. Syst. Sci., 26(3):280–294, 1983. doi:10.1016/0022-0000(83)90002-8.
- [16] Roberto Grossi, Costas S. Iliopoulos, Jesper Jansson, Zara Lim, Wing-Kin Sung, and Wiktor Zuba. Finding the cyclic covers of a string. In Chun-Cheng Lin, Bertrand M. T. Lin, and Giuseppe Liotta, editors, WALCOM: Algorithms and Computation - 17th International Conference and Workshops, WALCOM 2023, Hsinchu, Taiwan, March 22-24, 2023, Proceedings, volume 13973 of Lecture Notes in Computer Science, pages 139–150. Springer, 2023. doi:10.1007/978-3-031-27051-2_13.
- [17] Leo J Guibas and Andrew M Odlyzko. Periods in strings. Journal of Combinatorial Theory, Series A, 30(1):19–42, 1981. doi:10.1016/0097-3165(81)90038-8.
- [18] Qing Guo, Hui Zhang, and Costas S. Iliopoulos. Computing the -covers of a string. Inf. Sci., 177(19):3957–3967, 2007. doi:10.1016/J.INS.2007.02.020.
- [19] Costas S. Iliopoulos, Tomasz Kociumaka, Jakub Radoszewski, Wojciech Rytter, Tomasz Walen, and Wiktor Zuba. Linear-time computation of cyclic roots and cyclic covers of a string. In Laurent Bulteau and Zsuzsanna Lipták, editors, 34th Annual Symposium on Combinatorial Pattern Matching, CPM 2023, June 26-28, 2023, Marne-la-Vallée, France, volume 259 of LIPIcs, pages 15:1–15:15. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023. doi:10.4230/LIPICS.CPM.2023.15.
- [20] Juha Kärkkäinen, Dominik Kempa, and Simon J. Puglisi. Lightweight lempel-ziv parsing. In Vincenzo Bonifaci, Camil Demetrescu, and Alberto Marchetti-Spaccamela, editors, Experimental Algorithms, 12th International Symposium, SEA 2013, Rome, Italy, June 5-7, 2013. Proceedings, volume 7933 of Lecture Notes in Computer Science, pages 139–150. Springer, 2013. doi:10.1007/978-3-642-38527-8_14.
- [21] Masashi Kiyomi, Hirotaka Ono, Yota Otachi, Pascal Schweitzer, and Jun Tarui. Space-efficient algorithms for longest increasing subsequence. In Rolf Niedermeier and Brigitte Vallée, editors, 35th Symposium on Theoretical Aspects of Computer Science, STACS 2018, February 28 to March 3, 2018, Caen, France, volume 96 of LIPIcs, pages 44:1–44:15. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2018. doi:10.4230/LIPICS.STACS.2018.44.
- [22] Donald E. Knuth, James H. Morris Jr., and Vaughan R. Pratt. Fast pattern matching in strings. SIAM J. Comput., 6(2):323–350, 1977. doi:10.1137/0206024.
- [23] Tomasz Kociumaka, Jakub Radoszewski, Wojciech Rytter, and Tomasz Walen. Internal pattern matching queries in a text and applications. SIAM J. Comput., 53(5):1524–1577, 2024. doi:10.1137/23M1567618.
- [24] Lukasz Kondraciuk. String covers of a tree revisited. In Franco Maria Nardini, Nadia Pisanti, and Rossano Venturini, editors, String Processing and Information Retrieval - 30th International Symposium, SPIRE 2023, Pisa, Italy, September 26-28, 2023, Proceedings, volume 14240 of Lecture Notes in Computer Science, pages 297–309. Springer, 2023. doi:10.1007/978-3-031-43980-3_24.
- [25] Dmitry Kosolobov and Nikita Sivukhin. Construction of sparse suffix trees and LCE indexes in optimal time and space. In Shunsuke Inenaga and Simon J. Puglisi, editors, 35th Annual Symposium on Combinatorial Pattern Matching, CPM 2024, June 25-27, 2024, Fukuoka, Japan, volume 296 of LIPIcs, pages 20:1–20:18. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.CPM.2024.20.
- [26] Yin Li and William F. Smyth. Computing the cover array in linear time. Algorithmica, 32(1):95–106, 2002. doi:10.1007/S00453-001-0062-2.
- [27] Neerja Mhaskar and W. F. Smyth. String covering: A survey. Fundam. Informaticae, 190(1):17–45, 2022. doi:10.3233/FI-222164.
- [28] Dennis W. G. Moore and William F. Smyth. Computing the covers of a string in linear time. In Daniel Dominic Sleator, editor, Proceedings of the Fifth Annual ACM-SIAM Symposium on Discrete Algorithms. 23-25 January 1994, Arlington, Virginia, USA, pages 511–515. ACM/SIAM, 1994. URL: http://dl.acm.org/citation.cfm?id=314464.314636.
- [29] Dennis W. G. Moore and William F. Smyth. A correction to "an optimal algorithm to compute all the covers of a string". Inf. Process. Lett., 54(2):101–103, 1995. doi:10.1016/0020-0190(94)00235-Q.
- [30] Jakub Radoszewski, Wojciech Rytter, Juliusz Straszynski, Tomasz Walen, and Wiktor Zuba. String covers of a tree. In Thierry Lecroq and Hélène Touzet, editors, String Processing and Information Retrieval - 28th International Symposium, SPIRE 2021, Lille, France, October 4-6, 2021, Proceedings, volume 12944 of Lecture Notes in Computer Science, pages 68–82. Springer, 2021. doi:10.1007/978-3-030-86692-1_7.
- [31] Jakub Radoszewski and Juliusz Straszynski. Efficient computation of 2-covers of a string. In Fabrizio Grandoni, Grzegorz Herman, and Peter Sanders, editors, 28th Annual European Symposium on Algorithms, ESA 2020, September 7-9, 2020, Pisa, Italy (Virtual Conference), volume 173 of LIPIcs, pages 77:1–77:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPICS.ESA.2020.77.
- [32] Jakub Radoszewski and Wiktor Zuba. Computing string covers in sublinear time. In Zsuzsanna Lipták, Edleno Silva de Moura, Karina Figueroa, and Ricardo Baeza-Yates, editors, String Processing and Information Retrieval - 31st International Symposium, SPIRE 2024, Puerto Vallarta, Mexico, September 23-25, 2024, Proceedings, volume 14899 of Lecture Notes in Computer Science, pages 272–288. Springer, 2024. doi:10.1007/978-3-031-72200-4_21.
- [33] Hui Zhang, Qing Guo, and Costas S. Iliopoulos. Algorithms for computing the lambda-regularities in strings. Fundam. Informaticae, 84(1):33–49, 2008. URL: http://content.iospress.com/articles/fundamenta-informaticae/fi84-1-04.
