Skip to main content
QUICK REVIEW

[Paper Review] Bounds on the Number of Longest Common Subsequences

Ronald I. Greenberg|ArXiv.org|Jan 28, 2003
Algorithms and Data CompressionComputer Science22 references9 citations
TL;DR

This paper establishes tight asymptotic bounds on the number of distinct longest common subsequences (LCS) and LCS embeddings in two sequences, showing that efficient algorithms generating these outputs in time proportional to the output size are significantly more scalable than naive backtracking methods. The key result is that the worst-case overhead of naive algorithms can be as high as Θ(4ⁿ/√n) for equal-length inputs, highlighting the necessity of optimized enumeration techniques.

ABSTRACT

This paper performs the analysis necessary to bound the running time of known, efficient algorithms for generating all longest common subsequences. That is, we bound the running time as a function of input size for algorithms with time essentially proportional to the output size. This paper considers both the case of computing all distinct LCSs and the case of computing all LCS embeddings. Also included is an analysis of how much better the efficient algorithms are than the standard method of generating LCS embeddings. A full analysis is carried out with running times measured as a function of the total number of input characters, and much of the analysis is also provided for cases in which the two input sequences are of the same specified length or of two independently specified lengths.

Motivation & Objective

  • To quantify the worst-case time complexity of generating all distinct longest common subsequences (LCS) as a function of input size.
  • To bound the maximum number of LCS embeddings, including duplicates, under naive enumeration strategies.
  • To compare the efficiency of efficient output-sensitive algorithms against naive backtracking methods that may generate duplicate embeddings.
  • To provide theoretical justification for using optimized algorithms over naive approaches in LCS enumeration tasks.

Proposed method

  • Derives a lower bound on the number of distinct LCSs using sequences with alternating character patterns based on length modulo 3.
  • Uses a crossing lemma to prove that embeddings of different initial characters in distinct LCSs must cross, enabling recursive bounding of output size.
  • Applies induction on the total length of input sequences to establish an upper bound of D(t) ≤ 4^(t/5) on the number of distinct LCSs.
  • Introduces normalized time analysis to bound the number of LCS embeddings by relating it to binomial coefficients via dynamic programming traceback.
  • Analyzes the worst-case overhead of naive backtracking by comparing it to the true output size, using combinatorial identities and asymptotic approximations.
  • Employs the identity C(n+m, m) to express the worst-case time complexity of naive enumeration, leading to bounds in terms of central binomial coefficients.

Experimental results

Research questions

  • RQ1What is the maximum number of distinct LCSs possible for two sequences of total length t?
  • RQ2What is the maximum number of LCS embeddings (including duplicates) that can be generated by a naive backtracking algorithm?
  • RQ3How much worse is the worst-case time complexity of naive LCS embedding enumeration compared to output-sensitive algorithms?
  • RQ4What is the asymptotic overhead of naive methods relative to the true output size for equal-length sequences?
  • RQ5Can the worst-case performance of naive LCS enumeration be bounded using combinatorial structures like binomial coefficients?

Key findings

  • The maximum number of distinct LCSs for two sequences of total length t is bounded above by 4^(t/5) < 1.32^t, and below by 3^(t/6) for t divisible by 6.
  • The number of LCS embeddings (including duplicates) generated by naive backtracking can be as high as Θ(4ⁿ/√n) for two sequences of length n, while the true output size is O(1) in some worst-case scenarios.
  • For sequences of total length t, the worst-case overhead of naive enumeration is Θ(2^t / √t), which grows exponentially with t.
  • The crossing lemma proves that embeddings of different initial characters in distinct LCSs must cross, enabling recursive decomposition and bounding of output size.
  • Efficient algorithms that generate all distinct LCSs or all embeddings in time proportional to output size are asymptotically superior to naive methods, which may report the same embedding exponentially many times.
  • The worst-case overhead of naive backtracking is Θ(C(2n, n)) = Θ(4^n / √n), which is the dominant factor in its inefficiency.

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.