##
###
Faster Queries for Longest Substring Palindrome After Block Edit

Mitsuru Funakoshi, Yuto Nakashima, Shunsuke Inenaga, Hideo Bannai, Masayuki Takeda, Michael Wagner

2019
*
Annual Symposium on Combinatorial Pattern Matching
*

Palindromes are important objects in strings which have been extensively studied from combinatorial, algorithmic, and bioinformatics points of views. Manacher [J. ACM 1975] proposed a seminal algorithm that computes the longest substring palindromes (LSPals) of a given string in O(n) time, where n is the length of the string. In this paper, we consider the problem of finding the LSPal after the string is edited. We present an algorithm that uses O(n) time and space for preprocessing, and
## more »

... the length of the LSPals in O( + log log n) time, after a substring in T is replaced by a string of arbitrary length . This outperforms the query algorithm proposed in our previous work [CPM 2018] that uses O( + log n) time for each query. ACM Subject Classification Mathematics of computing → Combinatorial algorithms length is odd, or a half-integer position if its length is even. Hence, in order to compute the LSPal of a given string T , it suffices to compute all maximal palindromes in T . Manacher [16] gave an elegant O(n)-time algorithm to find all maximal palindromes in a given string of length n. Manacher's algorithm utilizes symmetry of palindromes and character equality comparisons only, and therefore works in O(n) time for any alphabet. There is an alternative suffix tree [21] based algorithm which works in O(n) time in the case of an integer alphabet of polynomial size in n [13] . Finding the longest substring palindrome in the streaming model has also been considered [6, 11] . Now we consider the following question: what happens to those palindromes if the string T is edited? It seems natural to ask this kind of question since a typical biological sequence can contain some uncertainties such that there are multiple character possibilities at some positions in the sequence. In our recent work [9], we initiated this line of research and showed the following results. Let n be the length of the input string T and σ the alphabet size. 1-ELSPal. We can preprocess T in O(n) time and space such that later, we can answer in O(log min{σ, log n}) time the longest substring palindrome after a single character edit operation (insertion, deletion, or substitution).

doi:10.4230/lipics.cpm.2019.27
dblp:conf/cpm/FunakoshiNIBT19
fatcat:6ojz4dt5q5gelczyamhz66cqhu