arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1301.7183cs.DS
收藏

广义LCS问题的动态规划解法

A Dynamic Programming Solution to a Generalized LCS Problem

Lei Wang, Xiaodong Wang, Yingjie Wu, Daxin Zhu

摘要:

本文考虑了一个广义的最长公共子序列问题--排除串约束LCS问题。对于长度为$n$和$m$的两个输入序列$X$和$Y$,以及长度为$r$的约束串$P$,问题是找到$X$和$Y$的公共子序列$Z$,排除作为子串的$P$,并且$Z$的长度被最大化。该问题及其解决方案最早由Chen和Chao \cite{1}提出,但我们发现他们的算法不能正确解决该问题。然后,本文提出了一种新的动态规划解决STR-EC-LCS问题。证明了新算法的正确性。新算法的时间复杂度为$O(nmr)$。

英文摘要:

In this paper, we consider a generalized longest common subsequence problem, the string-excluding constrained LCS problem. For the two input sequences $X$ and $Y$ of lengths $n$ and $m$, and a constraint string $P$ of length $r$, the problem is to find a common subsequence $Z$ of $X$ and $Y$ excluding $P$ as a substring and the length of $Z$ is maximized. The problem and its solution were first proposed by Chen and Chao\cite{1}, but we found that their algorithm can not solve the problem correctly. A new dynamic programming solution for the STR-EC-LCS problem is then presented in this paper. The correctness of the new algorithm is proved. The time complexity of the new algorithm is $O(nmr)$.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑