Skip to main content
QUICK REVIEW

[Paper Review] Sketching, Streaming, and Fine-Grained Complexity of (Weighted) LCS

Karl Bringmann, Bhaskar Ray Chaudhury|arXiv (Cornell University)|Oct 2, 2018
Algorithms and Data CompressionComputer Science14 references4 citations
TL;DR

This paper presents a deterministic sketching and streaming algorithm for the Longest Common Subsequence (LCS) problem on strings over a fixed-size alphabet, achieving optimal space complexity of $\mathcal{O}(L^{|Σ|-1}\log L)$ bits. It proves tight lower bounds under the Strong Exponential Time Hypothesis (SETH), showing that the algorithm's running time of $\mathcal{O}(\min\{nm, n + m^{|Σ|}\})$ for the weighted LCS variant is optimal up to lower-order factors.

ABSTRACT

We study sketching and streaming algorithms for the Longest Common Subsequence problem (LCS) on strings of small alphabet size $|Σ|$. For the problem of deciding whether the LCS of strings $x,y$ has length at least $L$, we obtain a sketch size and streaming space usage of $\mathcal{O}(L^{|Σ| - 1} \log L)$. We also prove matching unconditional lower bounds. As an application, we study a variant of LCS where each alphabet symbol is equipped with a weight that is given as input, and the task is to compute a common subsequence of maximum total weight. Using our sketching algorithm, we obtain an $\mathcal{O}( extrm{min}\{nm, n + m^{\lvert Σ vert}\})$-time algorithm for this problem, on strings $x,y$ of length $n,m$, with $n \ge m$. We prove optimality of this running time up to lower order factors, assuming the Strong Exponential Time Hypothesis.

Motivation & Objective

  • To design efficient sketching and streaming algorithms for LCS on strings over a fixed-size alphabet $\Sigma$, where prior work assumed large alphabets.
  • To close the gap in understanding LCS complexity under space and time constraints for small alphabets, where strong lower bounds previously only applied to large alphabets.
  • To develop a sketching scheme that captures all common subsequences of length at most $L$, enabling efficient decision and streaming computation.
  • To prove optimality of the proposed algorithm's time and space complexity for the weighted LCS problem under the Strong Exponential Time Hypothesis (SETH).
  • To establish tight lower bounds for the weighted LCS problem by reducing from the Orthogonal Vectors problem under SETH.

Proposed method

  • Construct a subsequence $C_L(x)$ of $x$ that preserves all common subsequences of length $\leq L$, using $\mathcal{O}(L^{|Σ|-1})$ runs of length at most $L$.
  • Use a one-pass streaming algorithm to compute $C_L(x)$ in $\mathcal{O}(L^{|Σ|-1}\log L)$ space and $\mathcal{O}(1)$ time per symbol.
  • Encode each run using $\mathcal{O}(\log L)$ bits, resulting in a total sketch size of $\mathcal{O}(L^{|Σ|-1}\log L)$ bits.
  • Reduce the Orthogonal Vectors (OV) problem to the weighted LCS problem by constructing strings $x$ and $y$ such that $\text{WLCS}(x,y) \geq \tau$ iff an orthogonal pair exists.
  • Use a parameter $\alpha$ to control the length ratio $n/m$ and construct strings with $n = m^{\alpha \pm o(1)}$ to achieve tight hardness bounds.
  • Prove that solving the weighted LCS problem requires time $(nm)^{1-o(1)}$ under SETH, matching the algorithm's running time up to lower-order factors.

Experimental results

Research questions

  • RQ1Can we design a sketching or streaming algorithm for LCS that achieves sublinear space for strings over a fixed-size alphabet?
  • RQ2Is the sketch size $\mathcal{O}(L^{|Σ|-1}\log L)$ optimal for the LCS decision problem under small alphabet assumptions?
  • RQ3Can we achieve an optimal $\mathcal{O}(\min\{nm, n + m^{|Σ|}\})$-time algorithm for the weighted LCS problem on small alphabets?
  • RQ4Does the Strong Exponential Time Hypothesis (SETH) imply that no faster algorithm exists for weighted LCS on small alphabets?
  • RQ5Can we reduce the Orthogonal Vectors problem to weighted LCS in a way that preserves the time complexity under SETH?

Key findings

  • The proposed sketching algorithm achieves a sketch size of $\mathcal{O}(L^{|Σ|-1}\log L)$ bits, which is optimal up to constant factors.
  • The streaming algorithm uses $\mathcal{O}(L^{|Σ|-1}\log L)$ space and processes each symbol in $\mathcal{O}(1)$ time, with a total decoding time of $\mathcal{O}(L^{2|Σ|})$.
  • An $\mathcal{O}(\min\{nm, n + m^{|Σ|}\})$-time algorithm is obtained for the weighted LCS problem on strings of length $n, m$ with $n \geq m$.
  • The running time of this algorithm is optimal up to lower-order factors under the Strong Exponential Time Hypothesis (SETH).
  • The paper proves that solving weighted LCS requires time $(nm)^{1-o(1)}$ under SETH, establishing tight hardness for all $\alpha < \sigma$.
  • The construction of strings $x$ and $y$ ensures that $n = m^{\alpha \pm o(1)}$ and $|\Sigma| = \sigma$, enabling tight reductions from OV to weighted LCS.

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.