English

Efficient computation of longest single-arm-gapped palindromes in a string

Data Structures and Algorithms 2019-11-01 v5

Abstract

In this paper, we introduce new types of approximate palindromes called single-arm-gapped palindromes (shortly SAGPs). A SAGP contains a gap in either its left or right arm, which is in the form of either wgucuRwRwguc u^R w^R or wucuRgwRwuc u^Rgw^R, where ww and uu are non-empty strings, wRw^R and uRu^R are respectively the reversed strings of ww and uu, gg is a string called a gap, and cc is either a single character or the empty string. Here we call wuwu and uRwRu^R w^R the arm of the SAGP, and uv|uv| the length of the arm. We classify SAGPs into two groups: those which have ucuRucu^R as a maximal palindrome (type-1), and the others (type-2). We propose several algorithms to compute type-1 SAGPs with longest arms occurring in a given string, based on suffix arrays. Then, we propose a linear-time algorithm to compute all type-1 SAGPs with longest arms, based on suffix trees. Also, we show how to compute type-2 SAGPs with longest arms in linear time. We also perform some preliminary experiments to show practical performances of the proposed methods.

Cite

@article{arxiv.1609.03000,
  title  = {Efficient computation of longest single-arm-gapped palindromes in a string},
  author = {Shintaro Narisada and Diptarama Hendrian and Kazuyuki Narisawa and Shunsuke Inenaga and Ayumi Shinohara},
  journal= {arXiv preprint arXiv:1609.03000},
  year   = {2019}
}

Comments

19 pages, 11 figures

R2 v1 2026-06-22T15:45:35.192Z