[Paper Review] A Sub-Quadratic Algorithm for the Longest Common Increasing Subsequence Problem
This paper presents the first sub-quadratic algorithm for the Longest Common Increasing Subsequence (LCIS) problem, achieving O(n² / log¹ᐟ⁶ n) time complexity. It introduces a novel 'log-shaving' technique that identifies and exploits a sparse set of 'significant' symbol matches between sequences, avoiding reliance on traditional methods like the Four Russians trick used in LCS.
The Longest Common Increasing Subsequence problem (LCIS) is a natural variant of the celebrated Longest Common Subsequence (LCS) problem. For LCIS, as well as for LCS, there is an ?(n²)-time algorithm and a SETH-based conditional lower bound of ?(n^{2-ε}). For LCS, there is also the Masek-Paterson ?(n²/log n)-time algorithm, which does not seem to adapt to LCIS in any obvious way. Hence, a natural question arises: does any (slightly) sub-quadratic algorithm exist for the Longest Common Increasing Subsequence problem? We answer this question positively, presenting a ?(n²/log^a n)-time algorithm for a = 1/6-o(1). The algorithm is not based on memorizing small chunks of data (often used for logarithmic speedups, including the "Four Russians Trick" in LCS), but rather utilizes a new technique, bounding the number of significant symbol matches between the two sequences.
Motivation & Objective
- To overcome the O(n²) time barrier for the LCIS problem, which lacks a known sub-quadratic algorithm despite a conditional lower bound.
- To develop a technique that enables log-shaving in LCIS, analogous to the Four Russians trick in LCS, but adapted to the increasing subsequence constraint.
- To identify and exploit a sparse subset of symbol matches—'significant pairs'—to reduce the number of computations below O(n²).
- To demonstrate that a sub-quadratic algorithm for LCIS is possible, challenging the assumption that LCIS is inherently quadratic.
Proposed method
- Introduce the concept of 'significant pairs'—symbol matches (x,y) where A[x] = B[y] and the LCIS ending at (x,y) is maximized relative to earlier positions.
- Use a dynamic programming approach that processes only significant pairs, maintaining van Emde Boas queues to efficiently track LCIS lengths at each position.
- Classify symbols as 'frequent' or 'infrequent' based on a threshold t = n / √t, where frequent symbols appear ≥ √t times in B.
- For infrequent symbols, apply a binary search-based method to compute next LCIS extensions, bounded by O(n(log log n)² / √t) total time.
- For frequent symbols, leverage the sparsity of significant pairs (O(n²/t) such pairs) to bound the number of operations per symbol to O(n² log log n / t).
- Combine both cases and optimize the threshold t to achieve the final time complexity of O(n²(log log n)² / log¹ᐟ⁶ n).
Experimental results
Research questions
- RQ1Can a sub-quadratic algorithm be designed for LCIS, given its conditional O(n²−ε) lower bound under SETH?
- RQ2Is the Four Russians trick, effective for LCS, adaptable to LCIS, or is a fundamentally new technique required?
- RQ3Can the number of meaningful symbol matches (significant pairs) be bounded below O(n²) to enable log-shaving in LCIS?
- RQ4What is the tightest possible upper bound on the number of significant pairs in LCIS, and how does it affect algorithmic complexity?
Key findings
- The paper presents an O(n² / log¹ᐟ⁶ n) algorithm for LCIS, the first sub-quadratic algorithm for this problem.
- The number of significant pairs is bounded by O(n² / log¹ᐟ⁶ n), which is o(n²), enabling the algorithm to break the quadratic barrier.
- The algorithm uses a novel 'log-shaving' technique based on pruning non-significant symbol matches, rather than using small-chunk memoization like in LCS.
- The complexity is achieved by separating frequent and infrequent symbols and applying different optimization strategies to each, with the threshold t = n / √t tuned to balance both parts.
- The algorithm correctly computes the LCIS length, as proven by maintaining invariant properties in the dynamic programming state using van Emde Boas queues.
- The paper conjectures that an O(n²(log log n)^k / log n) algorithm may exist, suggesting further improvements are possible.
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.