TY - JOUR

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

AU - Booth, Hilary S.

AU - Macnamara, Shevarl F.

AU - Nielsen, Ole M.

AU - Wilson, Susan R.

PY - 2004

Y1 - 2004

N2 - 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.

AB - 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.

KW - Chvátal-Sankoff constant

KW - Longest common subsequence

KW - Sequence alignment

UR - http://www.scopus.com/inward/record.url?scp=25844476220&partnerID=8YFLogxK

U2 - 10.1023/B:MCAP.0000045088.88240.3a

DO - 10.1023/B:MCAP.0000045088.88240.3a

M3 - Article

SN - 1387-5841

VL - 6

SP - 401

EP - 421

JO - Methodology and Computing in Applied Probability

JF - Methodology and Computing in Applied Probability

IS - 4

ER -