Faster queries for longest substring palindrome after block edit

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

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 answers the length of the LSPals in O(\ell + \log \log n) time, after a substring in T is replaced by a string of arbitrary length \ell. This outperforms the query algorithm proposed in our previous work [CPM 2018] that uses O(\ell + \log n) time for each query.

Knowledge Graph

arrow_drop_up

Comments

Sign up or login to leave a comment