# The longest common subsequence problem for small alphabet size between many strings

## Abstract

Given two or more strings (for example, DNA and amino acid sequences), the longest common subsequence (LCS) problem is to determine the longest common subsequence obtained by deleting zero or more symbols from each string. The algorithms for computing an LCS between two strings were given by many papers, but there is no efficient algorithm for computing an LCS between more than two strings. This paper proposes a method for computing efficiently the LCS between three or more strings of small alphabet size. Specifically, our algorithm computes the LCS of *d*(≥ 3) strings of length *n* on alphabet of size *s* in *O(nsd+Dsd*(log^{ d }− 3 *n*+log^{d}− 2 *s*)) time, where *D* is the number of dominant matches and is much smaller than *n*^{ d }. Through computational experiments, we demonstrate the effectiveness of our algorithm.

## Keywords

Time Complexity Maximum Problem Longe Common Subsequence Alphabet Size Longe Common Subsequence## Preview

Unable to display preview. Download preview PDF.

## References

- [1]Apostolico, A. and C. Guerra, The longest common subsequence problem revisited,
*Algorithmica*, Vol. 2, 1987, pp. 315–336.MathSciNetGoogle Scholar - [2]Chin, F. Y. L. and C. K. Poon, A fast algorithm for computing longest common subsequences of small alphabet size,
*J. of Info. Proc.*, Vol. 13, No.4, 1990, pp. 463–469.Google Scholar - [3]Hirschberg, D. S., A linear space algorithm for computing maximal common subsequences,
*Comm. ACM*, Vol. 18, 1975, pp. 341–343.CrossRefGoogle Scholar - [4]Hirschberg, D. S., Algorithms for the longest common subsequence problem,
*J. ACM*, Vol. 24, 1977, pp. 664–675.CrossRefGoogle Scholar - [5]Hunt, J. W. and T. G. A. Szymanski, A fast algorithm for computing longest common subsequences,
*Comm. ACM*, Vol. 20, 1977, pp. 350–353.CrossRefGoogle Scholar - [6]Kung, H. T., F. Luccio, and F. P. Preparata, On finding the maxima of a set of vectors,
*J. ACM*, Vol. 22, No.4, 1975, pp. 469–476.CrossRefGoogle Scholar - [7]Masek, W. J., and M. S. Paterson, A faster algorithm computing string edit distances,
*JCSS*, 1980, pp.18–31.Google Scholar - [8]Preparata, F. P., and M. Shamos,
*Computational Geometry*, Springer-Verlag, 1985.Google Scholar - [9]Wagner, R. A., and M. J. Fischer, The string-to-string correction problem,
*J. ACM*, Vol. 21, No.1, 1974, pp. 168–173.CrossRefGoogle Scholar