当前位置: X-MOL 学术arXiv.cs.DS › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Faster STR-EC-LCS Computation
arXiv - CS - Data Structures and Algorithms Pub Date : 2020-01-16 , DOI: arxiv-2001.05671
Kohei Yamada, Yuto Nakashima, Shunsuke Inenaga, Hideo Bannai, and Masayuki Takeda

The longest common subsequence (LCS) problem is a central problem in stringology that finds the longest common subsequence of given two strings $A$ and $B$. More recently, a set of four constrained LCS problems (called generalized constrained LCS problem) were proposed by Chen and Chao [J. Comb. Optim, 2011]. In this paper, we consider the substring-excluding constrained LCS (STR-EC-LCS) problem. A string $Z$ is said to be an STR-EC-LCS of two given strings $A$ and $B$ excluding $P$ if, $Z$ is one of the longest common subsequences of $A$ and $B$ that does not contain $P$ as a substring. Wang et al. proposed a dynamic programming solution which computes an STR-EC-LCS in $O(mnr)$ time and space where $m = |A|, n = |B|, r = |P|$ [Inf. Process. Lett., 2013]. In this paper, we show a new solution for the STR-EC-LCS problem. Our algorithm computes an STR-EC-LCS in $O(n|\Sigma| + (L+1)(m-L+1)r)$ time where $|\Sigma| \leq \min\{m, n\}$ denotes the set of distinct characters occurring in both $A$ and $B$, and $L$ is the length of the STR-EC-LCS. This algorithm is faster than the $O(mnr)$-time algorithm for short/long STR-EC-LCS (namely, $L \in O(1)$ or $m-L \in O(1)$), and is at least as efficient as the $O(mnr)$-time algorithm for all cases.

中文翻译:

更快的 STR-EC-LCS 计算

最长公共子序列 (LCS) 问题是字符串学中的一个核心问题,它找出给定两个字符串 $A$ 和 $B$ 的最长公共子序列。最近,Chen 和 Chao 提出了一组四个约束 LCS 问题(称为广义约束 LCS 问题)[J. 梳子。优化,2011 年]。在本文中,我们考虑子串排除约束 LCS(STR-EC-LCS)问题。一个字符串 $Z$ 被认为是两个给定字符串 $A$ 和 $B$ 的 STR-EC-LCS,不包括 $P$ 如果,$Z$ 是 $A$ 和 $B$ 的最长公共子序列之一不包含 $P$ 作为子字符串。王等人。提出了一种动态规划解决方案,它在 $O(mnr)$ 时间和空间中计算 STR-EC-LCS,其中 $m = |A|,n = |B|,r = |P|$ [Inf. 过程。莱特,2013 年]。在本文中,我们展示了 STR-EC-LCS 问题的新解决方案。我们的算法在 $O(n|\Sigma| + (L+1)(m-L+1)r)$ 时间计算 STR-EC-LCS,其中 $|\Sigma| \leq \min\{m, n\}$ 表示出现在 $A$ 和 $B$ 中的一组不同的字符,$L$ 是 STR-EC-LCS 的长度。该算法比短/长 STR-EC-LCS 的 $O(mnr)$-time 算法(即 $L \in O(1)$ 或 $mL \in O(1)$)更快,并且是对于所有情况,至少与 $O(mnr)$-time 算法一样有效。
更新日期:2020-01-17
down
wechat
bug