Elsevier

Information Sciences

Volume 20, Issue 1, February 1980, Pages 69-82
Information Sciences

A fast algorithm for the longest-common-subsequence problem

https://doi.org/10.1016/0020-0255(80)90025-0Get rights and content

Abstract

In this paper, a fast algorithm for the longest-common-subsequence problem is presented which runs in O((p + n)log n), time where p is the total number of pairs of matched positions between the strings. Thus, the average performance of this algorithm is much better than those of the quadratic algorithms proposed earlier and takes only a linear amount of space.

References (14)

  • P.H. Sellers

    An algorithm for the distance between two finite sequences

    J. Combinatorial Theory Ser. A

    (1974)
  • A.V. Aho et al.

    Bounds on the complexity of the maximal common subsequence problem

  • V. Chvatal et al.

    Selected combinatorial research problems

  • D.S. Hirschberg

    A linear space algorithm for computing maximal common subsequences

    Comm. ACM

    (June 1975)
  • D.S. Hirschberg

    Algorithms for the longest common subsequence problem

    J. Assoc. Comput. Mach.

    (1977)
  • J.S. Hunt et al.

    A fast algorithm for computing longest common subsequences

    Comm. ACM

    (May 1977)
  • K. Jensen et al.
There are more references available in the full text version of this article.

Cited by (0)

This paper is based on Technical Report 77-01, Department of Computer Science, University of Iowa. This work was supported by the National Science Foundation under Grant MCS76-04763.

View full text