English

Longest Gapped Repeats and Palindromes

Data Structures and Algorithms 2023-06-22 v4

Abstract

A gapped repeat (respectively, palindrome) occurring in a word ww is a factor uvuuvu (respectively, uRvuu^Rvu) of ww. In such a repeat (palindrome) uu is called the arm of the repeat (respectively, palindrome), while vv is called the gap. We show how to compute efficiently, for every position ii of the word ww, the longest gapped repeat and palindrome occurring at that position, provided that the length of the gap is subject to various types of restrictions. That is, that for each position ii we compute the longest prefix uu of w[i..n]w[i..n] such that uvuv (respectively, uRvu^Rv) is a suffix of w[1..i1]w[1..i-1] (defining thus a gapped repeat uvuuvu -- respectively, palindrome uRvuu^Rvu), and the length of vv is subject to the aforementioned restrictions.

Cite

@article{arxiv.1511.07180,
  title  = {Longest Gapped Repeats and Palindromes},
  author = {Marius Dumitran and Paweł Gawrychowski and Florin Manea},
  journal= {arXiv preprint arXiv:1511.07180},
  year   = {2023}
}

Comments

This is an extension of the conference papers "Longest $\alpha$-Gapped Repeat and Palindrome", presented by the second and third authors at FCT 2015, and "Longest Gapped Repeats and Palindromes", presented by the first and third authors at MFCS 2015

R2 v1 2026-06-22T11:51:55.561Z