English

Efficiently Finding All Maximal $\alpha$-gapped Repeats

Data Structures and Algorithms 2015-10-01 v1

Abstract

For α1\alpha\geq 1, an α\alpha-gapped repeat in a word ww is a factor uvuuvu of ww such that uvαu|uv|\leq \alpha |u|; the two factors uu in such a repeat are called arms, while the factor vv 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 α\alpha-gapped repeats that may occur in a word is upper bounded by 18αn18\alpha n. This allows us to construct an algorithm finding all the maximal α\alpha-gapped repeats of a word in O(αn)O(\alpha n); this is optimal, in the worst case, as there are words that have Θ(αn)\Theta(\alpha n) maximal α\alpha-gapped repeats. Our techniques can be extended to get comparable results in the case of α\alpha-gapped palindromes, i.e., factors uvuTuvu^\mathrm{T} with uvαu|uv|\leq \alpha |u|.

Cite

@article{arxiv.1509.09237,
  title  = {Efficiently Finding All Maximal $\alpha$-gapped Repeats},
  author = {Paweł Gawrychowski and Tomohiro I and Shunsuke Inenaga and Dominik Köppl and Florin Manea},
  journal= {arXiv preprint arXiv:1509.09237},
  year   = {2015}
}
R2 v1 2026-06-22T11:09:22.018Z