Skip to main content
QUICK REVIEW

[Paper Review] Extensive Simulations for Longest Common Subsequences: Finite Size Scaling, a Cavity Solution, and Configuration Space properties

Jacques Boutet de Monvel|arXiv (Cornell University)|Sep 21, 1998
Algorithms and Data CompressionComputer Science25 references26 citations
TL;DR

This paper presents extensive Monte Carlo simulations of the Longest Common Subsequence (LCS) problem for random strings, introducing a finite-size scaling law that accurately extrapolates the asymptotic LCS length. It derives a cavity-like analytic solution for the Bernoulli Matching model, showing excellent agreement with simulations and providing a strong approximation for the random string model, particularly as alphabet size S increases.

ABSTRACT

The Longest Common Subsequence (LCS) Problem asks for the longest sequence of (non-contiguous) matches between two given strings of characters. Using extensive Monte Carlo simulations, we find a finite size scaling law of the form E(L)/N =C + A/(N^1/2 ln N)+... for the mean LCS length of two random strings of size N over S letters. We provide precise estimates of C for S between 2 and 15. We consider also a related Bernoulli Matching model where the different entries of an N times M array are independently occupied with probability 1/S. In that case we find the expression of the limit of L(N,M)/N as N grows to infinity, as a function of r=M/N. This expression provides a very good approximation for the Random String model, which gets more and more accurate as S increases. The question of the ``universality class'' of the LCS problem is also considered. For the Bernoulli Matching model we find very good agreement with recent scaling predictions of Hwa and Lassig for Needleman-Wunsch sequence alignment. We find however that the variance of the LCS length has a different scaling different in the Random String model, suggesting that long-ranged correlations among the matches are relevant in this model. We finally study the ``ground state'' properties of this problem. We find in particular that the number of solutions typically grows exponentially with N, i.e. this system has a residual entropy at T=0. Also the overlap between two LCSs chosen at random is found to be self averaging and to aproach a definite value q(S)<1 as N grows.

Motivation & Objective

  • To improve the precision of the asymptotic LCS length constant γS for random strings using finite-size scaling.
  • To investigate the universality class of the LCS problem by comparing the random string model with a simplified Bernoulli Matching model.
  • To analyze the statistical properties of the solution space, including the number of optimal LCSs and their typical overlap.
  • To examine the role of long-range correlations in the variance scaling of LCS length, contrasting with standard percolation models.

Proposed method

  • Performing large-scale Monte Carlo simulations on random strings of size N to estimate the average LCS length E(LN).
  • Proposing a finite-size scaling law: E(LN)/N = γS + AS/(ln(N√N)) + ..., to extrapolate γS from finite-N data.
  • Introducing the Bernoulli Matching model, where matches occur independently with probability 1/S in an N×N matrix.
  • Applying a cavity-like mean-field approach to derive an analytic expression for the passage time function γSB(r) = (2√(rS) - r - 1)/(S - 1).
  • Comparing the analytic γSB(r) with simulation results to validate the cavity method and assess its accuracy.
  • Analyzing the number of optimal LCSs and their overlap to assess solution space structure and self-averaging behavior.

Experimental results

Research questions

  • RQ1What is the finite-size scaling behavior of the average LCS length in random strings, and can it be modeled accurately to improve estimates of the asymptotic constant γS?
  • RQ2How accurate is the cavity-like analytic solution for the Bernoulli Matching model in approximating the LCS behavior in the more complex random string model?
  • RQ3Does the LCS problem belong to the same universality class as directed polymers or first-passage percolation, particularly regarding variance scaling?
  • RQ4What is the nature of the solution space—does the number of optimal LCSs grow exponentially with string length, and what is the typical overlap between two randomly chosen LCSs?
  • RQ5Are long-range correlations among matches in the random string model relevant to the variance scaling of LCS length, and how do they affect universality?

Key findings

  • The finite-size scaling law E(LN)/N = γS + AS/(ln(N√N)) + ... provides a highly accurate method for extrapolating the asymptotic LCS length, significantly improving estimates of γS for 2 ≤ S ≤ 15.
  • The cavity-derived expression γSB(r) = (2√(rS) - r - 1)/(S - 1) for the Bernoulli Matching model shows excellent agreement with numerical simulations and serves as a strong approximation for the random string model, especially as S increases.
  • The number of optimal LCSs, NLCS, grows exponentially with N, indicating that the system does not satisfy Nernst’s principle and that solutions are typically distinct.
  • The overlap between two randomly selected LCSs is self-averaging and approaches a non-zero constant qS < 1 as N → ∞, confirming the existence of a large, diverse solution space.
  • The variance of LCS length, Var(LN), scales as N^2/3 in the Bernoulli Matching model but shows a different scaling in the random string model, suggesting that long-range correlations are relevant and may affect the universality class.
  • The results suggest that the inclusion of gap penalties in models like Needleman-Wunsch may suppress the effects of long-range correlations, extending the small-N scaling regime and potentially masking the true universality behavior observed in unpenalized models.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.