IDEAS home Printed from https://ideas.repec.org/a/spr/metcap/v6y2004i4d10.1023_bmcap.0000045088.88240.3a.html
   My bibliography  Save this article

An Iterative Approach to Determining the Length of the Longest Common Subsequence of Two Strings

Author

Listed:
  • Hilary S. Booth

    (Australian National University)

  • Shevarl F. MacNamara

    (Australian National University)

  • Ole M. Nielsen

    (Australian National University)

  • Susan R. Wilson

    (Australian National University)

Abstract

This paper concerns the longest common subsequence (LCS) shared by two sequences (or strings) of length N, whose elements are chosen at random from a finite alphabet. The exact distribution and the expected value of the length of the LCS, k say, between two random sequences is still an open problem in applied probability. While the expected value E(N) of the length of the LCS of two random strings is known to lie within certain limits, the exact value of E(N) and the exact distribution are unknown. In this paper, we calculate the length of the LCS for all possible pairs of binary sequences from N=1 to 14. The length of the LCS and the Hamming distance are represented in color on two all-against-all arrays. An iterative approach is then introduced in which we determine the pairs of sequences whose LCS lengths increased by one upon the addition of one letter to each sequence. The pairs whose score did increase are shown in black and white on an array, which has an interesting fractal-like structure. As the sequence length increases, R(N) (the proportion of sequences whose score increased) approaches the Chvátal–Sankoff constant a c (the proportionality constant for the linear growth of the expected length of the LCS with sequence length). We show that R(N) is converging more rapidly to a c than E(N)/N.

Suggested Citation

  • Hilary S. Booth & Shevarl F. MacNamara & Ole M. Nielsen & Susan R. Wilson, 2004. "An Iterative Approach to Determining the Length of the Longest Common Subsequence of Two Strings," Methodology and Computing in Applied Probability, Springer, vol. 6(4), pages 401-421, December.
  • Handle: RePEc:spr:metcap:v:6:y:2004:i:4:d:10.1023_b:mcap.0000045088.88240.3a
    DOI: 10.1023/B:MCAP.0000045088.88240.3a
    as

    Download full text from publisher

    File URL: http://link.springer.com/10.1023/B:MCAP.0000045088.88240.3a
    File Function: Abstract
    Download Restriction: Access to the full text of the articles in this series is restricted.

    File URL: https://libkey.io/10.1023/B:MCAP.0000045088.88240.3a?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    As the access to this document is restricted, you may want to search for a different version of it.

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Stanislaw Barder & Jüri Lember & Heinrich Matzinger & Märt Toots, 2012. "On Suboptimal LCS-alignments for Independent Bernoulli Sequences with Asymmetric Distributions," Methodology and Computing in Applied Probability, Springer, vol. 14(2), pages 357-382, June.
    2. Lember, Jüri & Matzinger, Heinrich & Sova, Joonas & Zucca, Fabio, 2018. "Lower bounds for moments of global scores of pairwise Markov chains," Stochastic Processes and their Applications, Elsevier, vol. 128(5), pages 1678-1710.

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:spr:metcap:v:6:y:2004:i:4:d:10.1023_b:mcap.0000045088.88240.3a. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Sonal Shukla or Springer Nature Abstracting and Indexing (email available below). General contact details of provider: http://www.springer.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.