论文标题

在子字中找到最长的最长allindromes

Finding Top-k Longest Palindromes in Substrings

论文作者

Mitani, Kazuki, Mieno, Takuya, Seto, Kazuhisa, Horiyama, Takashi

论文摘要

plindromes是向前和向后读相同的字符串。多年来,已经研究了弦线中计算综合体结构的问题,以其应用于生物学的动机。最长的回文问题是有关腔植物结构的最重要,最古典的问题之一,也就是说,要计算出在长度$ n $的字符串$ t $中出现的最长的回文。著名的Manacher算法可以以$ O(n)$时间来解决该问题[ACM杂志,1975年]。本文将最长的回文问题概括为在任意子字符串中找到最长的$ K $最长的wallindromes的问题,包括输入字符串$ t $本身。内部上$ k $最长的回信查询是,给定$ t $ t $ $ t $的$ t [i..j] $ t $和一个正整数$ k $作为查询,以计算出现在$ t [i .. j] $中的上$ k $最长的palindromes。本文提出了一个线性大小的数据结构,可以在最佳$ O(k)$时间中回答内部顶部 - $ K $最长的palindromes查询。另外,给定输入字符串$ t $,我们的数据结构可以在$ o(n \ log n)$时间中构造。对于$ k = 1 $,施工时间缩短为$ o(n)$。

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 $O(n)$ 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-$k$ longest palindromes in an arbitrary substring, including the input string $T$ itself. The internal top-$k$ longest palindrome query is, given a substring $T[i..j]$ of $T$ and a positive integer $k$ as a query, to compute the top-$k$ longest palindromes appearing in $T[i.. j]$. This paper proposes a linear-size data structure that can answer internal top-$k$ longest palindromes query in optimal $O(k)$ time. Also, given the input string $T$, our data structure can be constructed in $O(n\log n)$ time. For $k = 1$, the construction time is reduced to $O(n)$.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源