skip to main content
article
Free Access

Bounds on the Complexity of the Longest Common Subsequence Problem

Authors Info & Claims
Published:01 January 1976Publication History
Skip Abstract Section

Abstract

The problem of finding a longest common subsequence of two strings is discussed. This problem arises in data processing applications such as comparing two files and in genetic applications such as studying molecular evolution. The difficulty of computing a longest common subsequence of two strings is examined using the decision tree model of computation, in which vertices represent “equal - unequal” comparisons. It is shown that unless a bound on the total number of distinct symbols is assumed, every solution to the problem can consume an amount of time that is proportional to the product of the lengths of the two strings. A general lower bound as a function of the ratio of alphabet size to string length is derived. The case where comparisons between symbols of the same string are forbidden is also considered and it is shown that this problem is of linear complexity for a two-symbol alphabet and quadratic for an alphabet of three or more symbols.

References

  1. 1 AHO, A V, HOPCROF'r, J E, AND ULLMAN, J D The Design and Analysts oJ Computer Algorlthrns. Addison-Wesley, Reading, Mass, 1974 Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2 CARTWRIGHT, D, AND HARARY, F On colorings of signed graphs Elemente der Mathemattk 23 (1968), 85-89Google ScholarGoogle Scholar
  3. 3 CHVATAL, V, KLARNER, D A, AND KNUTH, D E Selected combmatonal research problems STAN-CS-72-292, Stanford U, Stanford, Cahf, 1972, p 26 Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4 CHVATAL, V, AND SANKOFF, D Longest common subsequences of two random sequences STAN- CS-75-477, Stanford U, Stanford, Cahf, Jan 1975 Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5 FISCHER, M J , AND PATERSON, M S Strmg matching and other products MAC Technical Memorandum 41, M 1 T , Cambridge, Mass, 1974 Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6 FREDMAN, M L On computing the length of longest mcreasmg subsequences Discrete Mathematics 11, 1 (January 1975) 29-36Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7 HIRSCHBERG, D S A hnear space algorithm for computmg maximal common subsequences Comm 4CM 18, 6 (June 1975) 341-343 Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8 HIRSCHBERG, D S On finding maximal common subsequences TR-156, Computer Sciences Laboratory, Princeton U, Prmceton, N J , 1974Google ScholarGoogle Scholar
  9. 9 HUNT. J W, AND SZYMANSKI. T G A fast algorithm for computing longest common subsequences Unpublished memorandum, Princeton University, September 1975Google ScholarGoogle Scholar
  10. 10 KERNIGHAN, B W, AND CHERRY, L L A system for typesetting mathematics Comm ACM 18, 3 (March 1975), 151-157 Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 11 NEEDLEMAN, S B, AND WUNSCH, C D A general method applicable to the search for similarities m the amino acid sequence of two proteins J Mol Btol 48 (1970), 443-453Google ScholarGoogle ScholarCross RefCross Ref
  12. 12 PATERSON, M S Unpublished manuscript University of Warwick, England, 1974Google ScholarGoogle Scholar
  13. 13 REINGOLD, E M On the optimality of some set algorithms J ACM 19, 4 (October 1972), 649-659 Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 14 SANKOFF, D Matching sequences under deletion/insertion constraints Proc. Nat. Acad Sct. USA 69, 1 (Jan, 1972), 4-6Google ScholarGoogle ScholarCross RefCross Ref
  15. 15 VAN EMDE BOAS, P Preserving order m a forest in less than logarithmic time Sixteenth Annual IEEE Symposium on Foundations o! Computer Science, October 1975Google ScholarGoogle Scholar
  16. 16 WAGNER, R A, AND FISCHER, M J The strmg-to-strmg correction problem J ACM 21, 1 (Jan, 1974), 168-173 Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 17 WONG, C K, AND CHANDRA, A K Bounds for the string editing problem IBM Research Center, Yorktown Heights, New York, 1974Google ScholarGoogle Scholar
  18. 18 YAO, A C, AND YAO, F F On computing the rank function for a set of vectors UIUCDCS-R-75- 699, Dept of Computer Science, U of Illinois, Urbana, I11, Feb, 1975Google ScholarGoogle Scholar

Index Terms

  1. Bounds on the Complexity of the Longest Common Subsequence Problem

              Recommendations

              Comments

              Login options

              Check if you have access through your login credentials or your institution to get full access on this article.

              Sign in

              Full Access

              • Published in

                cover image Journal of the ACM
                Journal of the ACM  Volume 23, Issue 1
                Jan. 1976
                220 pages
                ISSN:0004-5411
                EISSN:1557-735X
                DOI:10.1145/321921
                Issue’s Table of Contents

                Copyright © 1976 ACM

                Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                Publisher

                Association for Computing Machinery

                New York, NY, United States

                Publication History

                • Published: 1 January 1976
                Published in jacm Volume 23, Issue 1

                Permissions

                Request permissions about this article.

                Request Permissions

                Check for updates

                Qualifiers

                • article

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader