An iterative approach to determining the length of the longest common subsequence of two strings

Hilary S. Booth*, Shevarl F. Macnamara, Ole M. Nielsen, Susan R. Wilson

*Corresponding author for this work

    Research output: Contribution to journalArticlepeer-review

    4 Citations (Scopus)

    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 ac than E(N)/N.

    Original languageEnglish
    Pages (from-to)401-421
    Number of pages21
    JournalMethodology and Computing in Applied Probability
    Volume6
    Issue number4
    DOIs
    Publication statusPublished - 2004

    Fingerprint

    Dive into the research topics of 'An iterative approach to determining the length of the longest common subsequence of two strings'. Together they form a unique fingerprint.

    Cite this