The generalized constrained longest common subsequence in the run-length encoded format

IF 1 4区 计算机科学 Q3 COMPUTER SCIENCE, THEORY & METHODS
En-An Song , Chang-Biau Yang , Kuo-Tsung Tseng
{"title":"The generalized constrained longest common subsequence in the run-length encoded format","authors":"En-An Song ,&nbsp;Chang-Biau Yang ,&nbsp;Kuo-Tsung Tseng","doi":"10.1016/j.ic.2025.105311","DOIUrl":null,"url":null,"abstract":"<div><div>The longest common subsequence (LCS) is commonly used as a similarity measurement between two given sequences (strings). Several variants of the LCS problem have been developed. The generalized constrained LCS (CLCS) problems have four variants: substring exclusion (STR-EC-LCS), substring inclusion, subsequence exclusion and subsequence inclusion. In the STR-EC-LCS problem, a given constraint string is excluded as a substring from the answer. For the STR-EC-LCS problem with run-length encoded (RLE) strings, we are given two strings <em>X</em> and <em>Y</em>, along with a constraint string <em>P</em>, consisting of <em>M</em>, <em>N</em> and <em>R</em> runs, respectively. In their plain (non-RLE) representations, the lengths of these strings are <span><math><mo>|</mo><mi>X</mi><mo>|</mo><mo>=</mo><mi>m</mi></math></span>, <span><math><mo>|</mo><mi>Y</mi><mo>|</mo><mo>=</mo><mi>n</mi></math></span> and <span><math><mo>|</mo><mi>P</mi><mo>|</mo><mo>=</mo><mi>r</mi></math></span>. We combine the state transition with the dynamic programming approach to solve the STR-EC-LCS problem with RLE strings. The time complexity of our algorithm is O<span><math><mo>(</mo><mi>r</mi><mo>(</mo><mi>M</mi><mi>n</mi><mo>+</mo><mi>m</mi><mi>N</mi><mo>)</mo><mo>)</mo></math></span>. The previous algorithm for STR-EC-LCS without RLE has a time complexity of O<span><math><mo>(</mo><mi>m</mi><mi>n</mi><mi>r</mi><mo>)</mo></math></span>. Since <span><math><mi>M</mi><mo>≤</mo><mi>m</mi></math></span> and <span><math><mi>N</mi><mo>≤</mo><mi>n</mi></math></span>, our algorithm improves the previous algorithm in time complexity. Additionally, our algorithm, which is based on state transitions, is universal and can be applied to the other three variants of the generalized constrained LCS problem with the same complexity.</div></div>","PeriodicalId":54985,"journal":{"name":"Information and Computation","volume":"305 ","pages":"Article 105311"},"PeriodicalIF":1.0000,"publicationDate":"2025-05-19","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/S0890540125000471","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

The longest common subsequence (LCS) is commonly used as a similarity measurement between two given sequences (strings). Several variants of the LCS problem have been developed. The generalized constrained LCS (CLCS) problems have four variants: substring exclusion (STR-EC-LCS), substring inclusion, subsequence exclusion and subsequence inclusion. In the STR-EC-LCS problem, a given constraint string is excluded as a substring from the answer. For the STR-EC-LCS problem with run-length encoded (RLE) strings, we are given two strings X and Y, along with a constraint string P, consisting of M, N and R runs, respectively. In their plain (non-RLE) representations, the lengths of these strings are |X|=m, |Y|=n and |P|=r. We combine the state transition with the dynamic programming approach to solve the STR-EC-LCS problem with RLE strings. The time complexity of our algorithm is O(r(Mn+mN)). The previous algorithm for STR-EC-LCS without RLE has a time complexity of O(mnr). Since Mm and Nn, our algorithm improves the previous algorithm in time complexity. Additionally, our algorithm, which is based on state transitions, is universal and can be applied to the other three variants of the generalized constrained LCS problem with the same complexity.
运行长度编码格式的广义约束最长公共子序列
最长公共子序列(LCS)通常用作两个给定序列(字符串)之间的相似性度量。LCS问题的几个变体已经被开发出来。广义约束LCS (CLCS)问题有四种变体:子串排除(STR-EC-LCS)、子串包含、子序列排除和子序列包含。在STR-EC-LCS问题中,给定的约束字符串作为子字符串从答案中排除。对于具有运行长度编码(RLE)字符串的STR-EC-LCS问题,我们给出两个字符串X和Y,以及一个约束字符串P,分别由M, N和R运行组成。在它们的普通(非rle)表示中,这些字符串的长度为|X|=m, |Y|=n和|p |=r。我们将状态转移与动态规划方法相结合,解决了带有RLE字符串的STR-EC-LCS问题。算法的时间复杂度为O(r(Mn+ Mn))。之前的无RLE STR-EC-LCS算法的时间复杂度为0 (mnr)。由于M≤M且N≤N,我们的算法在时间复杂度上改进了之前的算法。此外,该算法基于状态转移,具有通用性,可以应用于具有相同复杂度的广义约束LCS问题的其他三种变体。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术文献互助群
群 号:604180095
Book学术官方微信