Internal Longest Palindrome Queries in Optimal Time

arxiv(2022)

引用 0|浏览0
暂无评分
摘要
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.
更多
查看译文
关键词
internal longest palindrome queries,optimal time
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络
Chat Paper
正在生成论文摘要