Fast and Simple Computation of All Longest Common Subsequences
Ronald I. Greenberg
Abstract
This paper shows that a simple algorithm produces the 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.
Create a lesson
Related papers
Fast FPRAS for the Permanent
Xiaoyu Chen, Heng Guo, Eric Vigoda et al.
Large-Scale Trade-Off Curve Computation for Incentive Allocation with Cardinality and Matroid Constraints
Yu Cong, Chao Xu, Yi Zhou
An Ω( n m) Information-Theoretic Lower Bound for Randomized Online Set Cover
Roie Levin
Optimal Simulated Annealing for Partition Function Estimation
Heng Guo, Hongyang Liu, Xiongxin Yang et al.
Emergency Vertex Cover
Eric Angel, Evangelos Bampas, Evripidis Bampis et al.
Exact Greedy Influence Maximization in Linear Time on Bounded-Treewidth Graphs
Matic Požar