The longest letter-duplicated subsequence and related problems

IF 0.4 4区 计算机科学 Q4 COMPUTER SCIENCE, INFORMATION SYSTEMS Acta Informatica Pub Date : 2024-07-20 DOI:10.1007/s00236-024-00459-7
Wenfeng Lai, Adiesha Liyanage, Binhai Zhu, Peng Zou
{"title":"The longest letter-duplicated subsequence and related problems","authors":"Wenfeng Lai, Adiesha Liyanage, Binhai Zhu, Peng Zou","doi":"10.1007/s00236-024-00459-7","DOIUrl":null,"url":null,"abstract":"<p>Motivated by computing duplication patterns in sequences, a new problem called the longest letter-duplicated subsequence (LLDS) is proposed. Given a sequence <i>S</i> of length <i>n</i>, a letter-duplicated subsequence is a subsequence of <i>S</i> in the form of <span>\\(x_1^{d_1}x_2^{d_2}\\ldots x_k^{d_k}\\)</span> with <span>\\(x_i\\in \\Sigma \\)</span>, <span>\\(x_j\\ne x_{j+1}\\)</span> and <span>\\(d_i\\ge 2\\)</span> for all <i>i</i> in [<i>k</i>] and <i>j</i> in <span>\\([k-1]\\)</span>. A linear time algorithm for computing a longest letter-duplicated subsequence (LLDS) of <i>S</i> can be easily obtained. In this paper, we focus on two variants of this problem: (1) ‘all-appearance’ version, i.e., all letters in <span>\\(\\Sigma \\)</span> must appear in the solution, and (2) the weighted version. For the former, we obtain dichotomous results: We prove that, when each letter appears in <i>S</i> at least 4 times, the problem and a relaxed version on feasibility testing (FT) are both NP-hard. The reduction is from <span>\\((3^+,1,2^-)\\)</span>-SAT, where all 3-clauses (i.e., containing 3 lals) are monotone (i.e., containing only positive literals) and all 2-clauses contain only negative literals. We then show that when each letter appears in <i>S</i> at most 3 times, then the problem admits an <i>O</i>(<i>n</i>) time algorithm. Finally, we consider the weighted version, where the weight of a block <span>\\(x_i^{d_i} (d_i\\ge 2)\\)</span> could be any positive function which might not grow with <span>\\(d_i\\)</span>. We give a non-trivial <span>\\(O(n^2)\\)</span> time dynamic programming algorithm for this version, i.e., computing an LD-subsequence of <i>S</i> whose weight is maximized.</p>","PeriodicalId":7189,"journal":{"name":"Acta Informatica","volume":null,"pages":null},"PeriodicalIF":0.4000,"publicationDate":"2024-07-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Acta Informatica","FirstCategoryId":"94","ListUrlMain":"https://doi.org/10.1007/s00236-024-00459-7","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q4","JCRName":"COMPUTER SCIENCE, INFORMATION SYSTEMS","Score":null,"Total":0}
引用次数: 0

Abstract

Motivated by computing duplication patterns in sequences, a new problem called the longest letter-duplicated subsequence (LLDS) is proposed. Given a sequence S of length n, a letter-duplicated subsequence is a subsequence of S in the form of \(x_1^{d_1}x_2^{d_2}\ldots x_k^{d_k}\) with \(x_i\in \Sigma \), \(x_j\ne x_{j+1}\) and \(d_i\ge 2\) for all i in [k] and j in \([k-1]\). A linear time algorithm for computing a longest letter-duplicated subsequence (LLDS) of S can be easily obtained. In this paper, we focus on two variants of this problem: (1) ‘all-appearance’ version, i.e., all letters in \(\Sigma \) must appear in the solution, and (2) the weighted version. For the former, we obtain dichotomous results: We prove that, when each letter appears in S at least 4 times, the problem and a relaxed version on feasibility testing (FT) are both NP-hard. The reduction is from \((3^+,1,2^-)\)-SAT, where all 3-clauses (i.e., containing 3 lals) are monotone (i.e., containing only positive literals) and all 2-clauses contain only negative literals. We then show that when each letter appears in S at most 3 times, then the problem admits an O(n) time algorithm. Finally, we consider the weighted version, where the weight of a block \(x_i^{d_i} (d_i\ge 2)\) could be any positive function which might not grow with \(d_i\). We give a non-trivial \(O(n^2)\) time dynamic programming algorithm for this version, i.e., computing an LD-subsequence of S whose weight is maximized.

Abstract Image

查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
最长字母重复子序列及相关问题
受计算序列中重复模式的启发,我们提出了一个称为最长字母重复子序列(LLDS)的新问题。给定一个长度为 n 的序列 S,对于 [k] 中的所有 i 和 \([k-1]\) 中的所有 j,字母重复子序列是 S 的一个子序列,其形式为 \(x_1^{d_1}x_2^{d_2}\ldots x_k^{d_k}\) with \(x_i\in \Sigma \), \(x_j\ne x_{j+1}\) and \(d_i\ge 2\) 。计算 S 的最长字母重复子序列(LLDS)的线性时间算法很容易得到。在本文中,我们将重点讨论这个问题的两个变体:(1)"全部出现 "版本,即解中必须出现 \(\Sigma \) 中的所有字母;(2)加权版本。对于前者,我们得到了二分结果:我们证明,当每个字母在 S 中至少出现 4 次时,这个问题和可行性测试(FT)的简化版本都是 NP-困难的。该问题是由\((3^+,1,2^-)\)-SAT 简化而来的,其中所有 3 个分句(即包含 3 个字面量)都是单调的(即只包含正字面量),而所有 2 个分句只包含负字面量。然后我们证明,当每个字母在 S 中最多出现 3 次时,该问题的算法时间为 O(n)。最后,我们考虑了加权版本,其中块 \(x_i^{d_i} (d_i\ge 2)\)的权重可以是任何正函数,它可能不会随着 \(d_i\)的增长而增长。对于这个版本,我们给出了一种非微妙的(O(n^2))时间动态编程算法,即计算 S 的 LD 子序列,其权重最大化。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
Acta Informatica
Acta Informatica 工程技术-计算机:信息系统
CiteScore
2.40
自引率
16.70%
发文量
24
审稿时长
>12 weeks
期刊介绍: Acta Informatica provides international dissemination of articles on formal methods for the design and analysis of programs, computing systems and information structures, as well as related fields of Theoretical Computer Science such as Automata Theory, Logic in Computer Science, and Algorithmics. Topics of interest include: • semantics of programming languages • models and modeling languages for concurrent, distributed, reactive and mobile systems • models and modeling languages for timed, hybrid and probabilistic systems • specification, program analysis and verification • model checking and theorem proving • modal, temporal, first- and higher-order logics, and their variants • constraint logic, SAT/SMT-solving techniques • theoretical aspects of databases, semi-structured data and finite model theory • theoretical aspects of artificial intelligence, knowledge representation, description logic • automata theory, formal languages, term and graph rewriting • game-based models, synthesis • type theory, typed calculi • algebraic, coalgebraic and categorical methods • formal aspects of performance, dependability and reliability analysis • foundations of information and network security • parallel, distributed and randomized algorithms • design and analysis of algorithms • foundations of network and communication protocols.
期刊最新文献
Serial and parallel algorithms for order-preserving pattern matching based on the duel-and-sweep paradigm Linear-size suffix tries and linear-size CDAWGs simplified and improved Parameterized aspects of distinct kemeny rank aggregation Word-representable graphs from a word’s perspective A closer look at Hamiltonicity and domination through the lens of diameter and convexity
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1