arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2210.02067cs.DS
收藏

非标准匹配模型中的极大回文计算

Computing maximal palindromes in non-standard matching models

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

AI总结:

本文厘清多种非标准匹配模型下基于反转与基于对称的回文定义是否等价,并扩展 Gusfield 与 Manacher 算法以线性时间计算所有极大回文。

摘要:

回文是文本数据处理、生物信息学和字组合学中常见且重要的对象。设 $S = XaY$ 为一个字符串,其中 $X$ 和 $Y$ 长度相同,而 $a$ 是单个字符或空字符串。于是回文存在两种可选定义:如果 $S$ 等于其反转 $S^R$,则称 $S$ 为回文(基于反转的定义);或者,如果其右臂 $Y$ 等于其左臂反转 $X^R$,则称 $S$ 为回文(基于对称的定义)。显然,如果两种定义中使用的“相等”($\approx$)都是精确字符匹配($=$),那么这两种定义是相同的。然而,如果我们采用其他字符串相等准则 $\approx$,包括生物序列的互补匹配模型、Cartesian-tree 模型 [Park et al., TCS 2020]、parameterized 模型 [Baker, JCSS 1996]、order-preserving 模型 [Kim et al., TCS 2014] 以及 palindromic-structure 模型 [I et al., TCS 2013],那么基于反转的回文与基于对称的回文是否仍然相同?据我们所知,此前没有工作考虑或回答过这一自然问题。本文首先回答该问题,随后给出在非标准匹配模型下计算给定字符串中所有极大回文的高效算法。在确认 Gusfield 基于后缀树的离线算法可直接扩展到上述匹配模型以计算极大的基于对称的回文之后,我们展示如何扩展 Manacher 的在线算法,以便针对上述所有匹配模型在线性时间内计算极大的基于反转的回文。

英文摘要:

Palindromes are popular and important objects in textual data processing, bioinformatics, and combinatorics on words. Let $S = XaY$ be a string where $X$ and $Y$ are of the same length, and $a$ is either a single character or the empty string. Then, there exist two alternative definitions for palindromes: $S$ is said to be a palindrome if $S$ is equal to its reversal $S^R$ (Reversal-based definition); or if its right-arm $Y$ is equal to the reversal of its left-arm $X^R$ (Symmetry-based definition). It is clear that if the ``equality'' ($\approx$) used in both definitions is exact character matching ($=$), then the two definitions are the same. However, if we apply other string-equality criteria $\approx$, including the complementary-matching model for biological sequences, the Cartesian-tree model [Park et al., TCS 2020], the parameterized model [Baker, JCSS 1996], the order-preserving model [Kim et al., TCS 2014], and the palindromic-structure model [I et al., TCS 2013], then are the reversal-based palindromes and the symmetry-based palindromes the same? To the best of our knowledge, no previous work has considered or answered this natural question. In this paper, we first provide answers to this question, and then present efficient algorithms for computing all maximal palindromes under the non-standard matching models in a given string. After confirming that Gusfield's offline suffix-tree-based algorithm for computing maximal symmetry-based palindromes can be readily extended to the aforementioned matching models, we show how to extend Manacher's online algorithm for computing maximal reversal-based palindromes in linear time for all the aforementioned matching models.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑