Efficiently Finding All Maximal α-gapped Repeats

Abstract

For α≥ 1, an α-gapped repeat in a word w is a factor uvu of w such that |uv|≤ α |u|; the two factors u in such a repeat are called arms, while the factor v is called gap. Such a repeat is called maximal if its arms cannot be extended simultaneously with the same symbol to the right or, respectively, to the left. In this paper we show that the number of maximal α-gapped repeats that may occur in a word is upper bounded by 18α n. This allows us to construct an algorithm finding all the maximal α-gapped repeats of a word in O(α n); this is optimal, in the worst case, as there are words that have (α n) maximal α-gapped repeats. Our techniques can be extended to get comparable results in the case of α-gapped palindromes, i.e., factors uvuT with |uv|≤ α |u|.

0

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.

Discussion (0)

Sign in to join the discussion.

Loading comments…