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 $T$ of length $n$. The problem can be solved in $\mathcal{O}(n)$ time by the famous algorithm of Manacher [Journal of the ACM, 1975]. In this paper, we consider the problem in the internal model. The internal longest palindrome query is, given a substring $T[i..j]$ of $T$ as a query, to compute the longest palindrome appearing in $T[i.. j]$. The best known data structure for this problem is the one proposed by Amir et al. [Algorithmica, 2020], which can answer any query in $\mathcal{O}(\log n)$ time. In this paper, we propose a linear-size data structure that can answer any internal longest palindrome query in constant time. Also, given the input string $T$, our data structure can be constructed in $\mathcal{O}(n)$ time.
翻译:Palindrodrome 是读出相同前向和后向的字符串。 在字符串中, 计算同一种前向和后向的字符串。 在对生物学应用的动机下, 多年以来一直在研究在字符串中计算同质体结构的问题。 最长期的同质体问题是对于同质体结构最重要和最古老的问题之一, 也就是说, 计算在长的字符串中出现的最长的同质体。 这个问题最著名的数据结构是Amir 和 Alacher [ACM Journal, 1975] 的著名算法 。 在本文中, 我们考虑的是内部模型中的问题。 最长的内部同质体问题查询是, 以$[i. j]$ 的子体, 美元作为查询, 也就是计算在$( t. j) 美元的字符串中, 。 这个问题最著名的数据结构是 Amir 和 al. [Algorithmica, 2020], 它可以回答$\macal n) $ 内部模型中的任何问题。 在最大时间里, 我们提出的数据结构中可以提出一个直线性数据 。