Computing maximal palindromes in non-standard matching models

IF 0.8 4区 计算机科学 Q3 COMPUTER SCIENCE, THEORY & METHODS
Takuya Mieno , Mitsuru Funakoshi , Yuto Nakashima , Shunsuke Inenaga , Hideo Bannai , Masayuki Takeda
{"title":"Computing maximal palindromes in non-standard matching models","authors":"Takuya Mieno ,&nbsp;Mitsuru Funakoshi ,&nbsp;Yuto Nakashima ,&nbsp;Shunsuke Inenaga ,&nbsp;Hideo Bannai ,&nbsp;Masayuki Takeda","doi":"10.1016/j.ic.2025.105283","DOIUrl":null,"url":null,"abstract":"<div><div><em>Palindromes</em> are popular and important objects in textual data processing, bioinformatics, and combinatorics on words. Let <span><math><mi>S</mi><mo>=</mo><mi>X</mi><mi>a</mi><mi>Y</mi></math></span> be a string where <em>X</em> and <em>Y</em> are of the same length, and <em>a</em> is either a single character or the empty string. Then, there exist two alternative definitions for palindromes: <em>S</em> is said to be a palindrome if <em>S</em> is equal to its reversal <span><math><msup><mrow><mi>S</mi></mrow><mrow><mi>R</mi></mrow></msup></math></span> (Reversal-based definition); or if its right-arm <em>Y</em> is equal to the reversal of its left-arm <span><math><msup><mrow><mi>X</mi></mrow><mrow><mi>R</mi></mrow></msup></math></span> (Symmetry-based definition). It is clear that if the “equality” (≈) used in both definitions is exact character matching (=), then the two definitions are the same. However, if we apply other string-equality criteria ≈, including the <em>complementary-matching model</em> for biological sequences, the <em>Cartesian-tree model</em> [Park et al., TCS 2020], the <em>parameterized model</em> [Baker, JCSS 1996], the <em>order-preserving model</em> [Kim et al., TCS 2014], and the <em>palindromic-structure model</em> [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 <em>maximal palindromes under the non-standard matching models</em> 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.</div></div>","PeriodicalId":54985,"journal":{"name":"Information and Computation","volume":"304 ","pages":"Article 105283"},"PeriodicalIF":0.8000,"publicationDate":"2025-02-18","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Information and Computation","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0890540125000197","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, THEORY & METHODS","Score":null,"Total":0}
引用次数: 0

Abstract

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 SR (Reversal-based definition); or if its right-arm Y is equal to the reversal of its left-arm XR (Symmetry-based definition). It is clear that if the “equality” (≈) used in both definitions is exact character matching (=), then the two definitions are the same. However, if we apply other string-equality criteria ≈, 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.
在非标准匹配模型中计算最大回文数
回文是文本数据处理、生物信息学和词语组合学中常用的重要对象。设S=XaY是一个字符串,其中X和Y具有相同的长度,并且a要么是单个字符,要么是空字符串。那么,回文存在两种可选的定义:如果S等于它的反转SR(基于反转的定义),则S被称为回文;或者它的右臂Y等于它的左臂XR的反转(基于对称的定义)。很明显,如果两个定义中使用的“等式”(≈)是精确字符匹配(=),则两个定义是相同的。然而,如果我们应用其他字符串相等标准≈,包括生物序列的互补匹配模型、笛卡儿树模型[Park等人,TCS 2020]、参数化模型[Baker, JCSS 1996]、保序模型[Kim等人,TCS 2014]和回文结构模型[I等人,TCS 2013],那么基于反转的回文和基于对称的回文是否相同?据我们所知,以前的工作没有考虑或回答过这个自然问题。本文首先给出了这个问题的答案,然后给出了在给定字符串的非标准匹配模型下计算所有最大回文的有效算法。在确认Gusfield基于词尾树的离线计算最大对称回文的算法可以很容易地扩展到上述匹配模型之后,我们展示了如何扩展Manacher的在线算法,用于在线性时间内计算所有上述匹配模型的最大基于反转的回文。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Information and Computation
Information and Computation 工程技术-计算机:理论方法
CiteScore
2.30
自引率
0.00%
发文量
119
审稿时长
140 days
期刊介绍: Information and Computation welcomes original papers in all areas of theoretical computer science and computational applications of information theory. Survey articles of exceptional quality will also be considered. Particularly welcome are papers contributing new results in active theoretical areas such as -Biological computation and computational biology- Computational complexity- Computer theorem-proving- Concurrency and distributed process theory- Cryptographic theory- Data base theory- Decision problems in logic- Design and analysis of algorithms- Discrete optimization and mathematical programming- Inductive inference and learning theory- Logic & constraint programming- Program verification & model checking- Probabilistic & Quantum computation- Semantics of programming languages- Symbolic computation, lambda calculus, and rewriting systems- Types and typechecking
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信