Abstract
Sequence comparison is a fundamental task in pattern matching. Its applications include file comparison, spelling correction, information retrieval, and computing (dis)similarities between biological sequences. A common scheme for sequence comparison is the longest common subsequence (LCS) metric. This paper considers the fully incremental LCS computation problem as follows: For any strings A,B and characters a,b, compute LCS(aA, B), LCS(A, bB), LCS(Aa, B), and LCS(A, Bb), provided that L = LCS(A, B) is already computed. We present an efficient algorithm that computes the four LCS values above, in O(L) or O(n) time depending on where a new character is added, where n is the length of A. Our algorithm is superior in both time and space complexities to the previous known methods.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Crochemore, M., Rytter, W.: Jewels of Stringology. World Scientific, Singapore (2002)
Gusfield, D.: Algorithms on Strings, Trees, and Sequences. Cambridge University Press, Cambridge (1997)
Crochemore, M., Landau, G.M., Ziv-Ukelson, M.: A sub-quadratic sequence alignment algorithm for unrestricted cost matrices. In: Proc. 13th SIAM Symposium on Discrete Algorithms (SODA 2002), pp. 679–688 (2002)
Hunt, J.W., Szymanski, T.G.: An algorithm for differential file comparison. Communications of the ACM 2, 417–439 (1977)
Amir, A., Eisenberg, E., Porat, E.: Swap and mismatch edit distance. In: Albers, S., Radzik, T. (eds.) ESA 2004. LNCS, vol. 3221, pp. 16–27. Springer, Heidelberg (2004)
Wu, S., Manber, U.: Fast text searching allowing errors. Communications of the ACM 35, 83–91 (1992)
Altschul, S.F., Madden, T.L., Schaffer, A.A., Zhang, J., Zhang, Z., Miller, W., Lipman, D.J.: Gapped BLAST and PSI-BLAST: a new generation of protein database search programs. Nucleic Acids Research 25, 3389–3402 (1997)
Li, M., Ma, B., Kisman, D., Tromp, J.: PatternHunter II: Highly sensitive and fast homology search. Journal of Bioinformatics and Computational Biology 2, 417–439 (2004)
Apostolico, A.: String editing and longest common subsequences. In: Handbook of Formal Languages, vol. 2, pp. 361–398. Springer, Heidelberg (1997)
Landau, G.M., Myers, E., Ziv-Ukelson, M.: Two algorithms for LCS consecutive suffix alignment. In: Sahinalp, S.C., Muthukrishnan, S.M., Dogrusoz, U. (eds.) CPM 2004. LNCS, vol. 3109, pp. 173–193. Springer, Heidelberg (2004)
Landau, G.M., Myers, E.W., Schmidt, J.P.: Incremental string comparison. SIAM Journal of Computing 27, 557–582 (1998)
Kim, S.R., Park, K.: A dynamic edit distance table. In: Giancarlo, R., Sankoff, D. (eds.) CPM 2000. LNCS, vol. 1848, pp. 60–68. Springer, Heidelberg (2000)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2005 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Ishida, Y., Inenaga, S., Shinohara, A., Takeda, M. (2005). Fully Incremental LCS Computation. In: Liśkiewicz, M., Reischuk, R. (eds) Fundamentals of Computation Theory. FCT 2005. Lecture Notes in Computer Science, vol 3623. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11537311_49
Download citation
DOI: https://doi.org/10.1007/11537311_49
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-28193-1
Online ISBN: 978-3-540-31873-6
eBook Packages: Computer ScienceComputer Science (R0)