[Paper Review] New tabulation and sparse dynamic programming based techniques for sequence similarity problems
This paper presents two novel algorithms for sequence similarity problems, leveraging tabulation and sparse dynamic programming to achieve improved time complexities: O(mn log log n / log²n) and O(mn / log²n + r) for LCS length computation, where r is the number of matching pairs. The techniques generalize to edit distance, LCTS, and MerLCS problems under specific dynamic programming dependency conditions.
Calculating the length of a longest common subsequence (LCS) of two strings $A$ and $B$ of length $n$ and $m$ is a classic research topic, with many worst-case oriented results known. We present two algorithms for LCS length calculation with respectively $O(mn \log\log n / \log^2 n)$ and $O(mn / \log^2 n + r)$ time complexity, the latter working for $r = o(mn / (\log n \log\log n))$, where $r$ is the number of matches in the dynamic programming matrix. We also describe conditions for a given problem sufficient to apply our techniques, with several concrete examples presented, namely the edit distance, LCTS and MerLCS problems.
Motivation & Objective
- To develop faster algorithms for computing the length of the longest common subsequence (LCS) between two sequences.
- To extend the applicability of tabulation and sparse dynamic programming to a broader class of sequence similarity problems.
- To identify general conditions under which these algorithmic techniques can be applied to achieve improved time complexity.
- To provide competitive worst-case time bounds for LCS, edit distance, LCTS, and MerLCS problems.
- To generalize the Four Russians technique to higher-dimensional dynamic programming tables using efficient lookup tables (LUTs).
Proposed method
- Apply tabulation-based dynamic programming using blocks of size b × b, where b = Θ(log n), to precompute and cache results for small subproblems.
- Use a lookup table (LUT) to store results for all possible combinations of input symbols and neighbor states in a block, enabling constant-time evaluation of block outputs.
- Introduce sparse dynamic programming (SDP) by visiting only matching pairs (i,j) in the DP matrix, reducing computation to r operations, where r is the number of matches.
- Combine tabulation with SDP: process the matrix in blocks, use LUTs for dense block computation, and apply SDP only to sparse regions with matches.
- Represent block states in differential form to reduce LUT size and improve space efficiency.
- Generalize the approach to three-dimensional DP tables (e.g., for MerLCS) using 3D blocks of size b × b × b with LUTs encoding input walls and outputs.
Experimental results
Research questions
- RQ1Can tabulation techniques be combined with sparse dynamic programming to achieve better worst-case time complexity for LCS and related problems?
- RQ2What structural conditions on dynamic programming dependencies allow for efficient application of tabulation and sparse DP techniques?
- RQ3Can the time complexity of LCS and related problems be improved beyond O(mn / log²n) when the number of matches r is subquadratic?
- RQ4How can the Four Russians technique be extended to higher-dimensional DP problems such as those involving three sequences?
- RQ5To what extent can the proposed methods be applied to problems like edit distance, LCTS, and MerLCS under the same structural constraints?
Key findings
- The paper presents an O(mn log log n / log²n) time algorithm for LCS length computation, improving upon the prior O(mn (log log n)² / log²n) bound by Bille and Farach-Colton.
- For sparse instances with r = o(mn / (log n log log n)), a new O(mn / log²n + r) time algorithm is proposed, which is faster than the standard O(mn) DP when r is small.
- The technique applies to the LCTS problem, yielding an O(mn (1 + σ / log²n)) time complexity under the condition σ = ω(log n (log log n)²), improving on previous results.
- For the MerLCS problem involving three sequences, the method achieves O(mnu / log³/²n) time complexity when u = Ω(n^c) for some c > 0, under the stated DP dependency conditions.
- The framework generalizes to any sequence similarity problem with DP recurrence satisfying bounded difference constraints and local dependency on a constant number of neighbors.
- The LUT-based block processing ensures that preprocessing time is dominated by the main computation, making the overall time complexity asymptotically optimal under the given assumptions.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.