Finding Top-k Longest Palindromes in Substrings
Abstract
Palindromes are strings that read the same forward and backward. Problems of computing palindromic structures in strings have been studied for many years with a motivation of their application to biology. The longest palindrome problem is one of the most important and classical problems regarding palindromic structures, that is, to compute the longest palindrome appearing in a string of length . The problem can be solved in time by the famous algorithm of Manacher [Journal of the ACM, 1975]. This paper generalizes the longest palindrome problem to the problem of finding top- longest palindromes in an arbitrary substring, including the input string itself. The internal top- longest palindrome query is, given a substring of and a positive integer as a query, to compute the top- longest palindromes appearing in . This paper proposes a linear-size data structure that can answer internal top- longest palindromes query in optimal time. Also, given the input string , our data structure can be constructed in time. For , the construction time is reduced to .
Cite
@article{arxiv.2210.02000,
title = {Finding Top-k Longest Palindromes in Substrings},
author = {Kazuki Mitani and Takuya Mieno and Kazuhisa Seto and Takashi Horiyama},
journal= {arXiv preprint arXiv:2210.02000},
year = {2023}
}