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":"<div><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></div>","PeriodicalId":7189,"journal":{"name":"Acta Informatica","volume":"61 3","pages":"315 - 329"},"PeriodicalIF":0.4000,"publicationDate":"2024-07-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://link.springer.com/content/pdf/10.1007/s00236-024-00459-7.pdf","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Acta Informatica","FirstCategoryId":"94","ListUrlMain":"https://link.springer.com/article/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.
期刊介绍:
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.