Fast and Simple Computation of All Longest Common Subsequences
Ronald I. Greenberg

TL;DR
This paper introduces a simple, efficient algorithm that constructs a graph representing all prefixes' LCSs of two sequences in quadratic time, enabling rapid generation of all LCSs and their embeddings.
Contribution
The paper presents a straightforward algorithm to compute the all-prefixes-LCSs-graph in O(mn) time, facilitating efficient enumeration of all LCSs and their embeddings.
Findings
All-prefixes-LCSs-graph can be constructed in O(mn) time.
All LCSs of any prefix pair can be generated proportional to output size.
The method simplifies and speeds up LCS enumeration processes.
Abstract
This paper shows that a simple algorithm produces the {\em all-prefixes-LCSs-graph} in time for two input sequences of size and . Given any prefix of the first input sequence and any prefix of the second input sequence, all longest common subsequences (LCSs) of and 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.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAlgorithms and Data Compression · Genomics and Phylogenetic Studies · Natural Language Processing Techniques
