Searching of gapped repeats and subrepetitions in a word
Abstract
A gapped repeat is a factor of the form uvu where u and v are nonempty words. The period of the gapped repeat is defined as |u|+|v|. The gapped repeat is maximal if it cannot be extended to the left or to the right by at least one letter with preserving its period. The gapped repeat is called α-gapped if its period is not greater than α |v|. A δ-subrepetition is a factor which exponent is less than 2 but is not less than 1+δ (the exponent of the factor is the quotient of the length and the minimal period of the factor). The δ-subrepetition is maximal if it cannot be extended to the left or to the right by at least one letter with preserving its minimal period. We reveal a close relation between maximal gapped repeats and maximal subrepetitions. Moreover, we show that in a word of length n the number of maximal α-gapped repeats is bounded by O(α2n) and the number of maximal δ-subrepetitions is bounded by O(n/δ2). Using the obtained upper bounds, we propose algorithms for finding all maximal α-gapped repeats and all maximal δ-subrepetitions in a word of length n. The algorithm for finding all maximal α-gapped repeats has O(α2n) time complexity for the case of constant alphabet size and O(n n + α2n) time complexity for the general case. For finding all maximal δ-subrepetitions we propose two algorithms. The first algorithm has O(n nδ2) time complexity for the case of constant alphabet size and O(n n +n nδ2) time complexity for the general case. The second algorithm has O(n n+nδ2 1δ) expected time complexity.
Turn this paper into a lesson
ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.