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

所有最长公共子序列的快速简便计算

Fast and Simple Computation of All Longest Common Subsequences

Ronald I. Greenberg

摘要:

本文证明了一个简单的算法,产生的{ \em所有前缀LCS图}在$O(mn)$时间为两个输入序列的大小$m$和$n$。给定第一输入序列的任何前缀$p$和第二输入序列的任何前缀$q$,一旦构造了全前缀LCS图,就可以在与输出大小成比例的时间内生成$p$和$q$的所有最长公共序列(LCS)。这个问题可以在生成表示LCS的所有不同字符串的上下文中解决,或者在生成将LCS嵌入两个输入字符串的所有方式的上下文中解决。

英文摘要:

This paper shows that a simple algorithm produces the {\em all-prefixes-LCSs-graph} in $O(mn)$ time for two input sequences of size $m$ and $n$. Given any prefix $p$ of the first input sequence and any prefix $q$ of the second input sequence, all longest common subsequences (LCSs) of $p$ and $q$ can be generated in time proportional to the output size, once the all-prefixes-LCSs-graph has been constructed. The problem can be solved in the context of generating all the distinct character strings that represent an LCS or in the context of generating all ways of embedding an LCS in the two input strings.

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

↑