[Paper Review] Gapped String Indexing in Subquadratic Space and Sublinear Query Time
This paper presents the first subquadratic-space and sublinear-query-time data structures for Gapped String Indexing, achieving ˜O(n²−δ) space and ˜O(n³δ · (occ + 1)) query time for any 0 ≤ δ ≤ 1. The approach introduces the Shifted Set Intersection problem, proves its equivalence to 3SUM Indexing, and leverages this to break long-standing time-space trade-off barriers in string indexing and Jumbled Indexing for constant-sized alphabets.
In Gapped String Indexing, the goal is to compactly represent a string $S$ of length $n$ such that for any query consisting of two strings $P_1$ and $P_2$, called patterns, and an integer interval $[α, β]$, called gap range, we can quickly find occurrences of $P_1$ and $P_2$ in $S$ with distance in $[α, β]$. Gapped String Indexing is a central problem in computational biology and text mining and has thus received significant research interest, including parameterized and heuristic approaches. Despite this interest, the best-known time-space trade-offs for Gapped String Indexing are the straightforward $O(n)$ space and $O(n+occ)$ query time or $Ω(n^2)$ space and $ ilde{O}(|P_1| + |P_2| + occ)$ query time. We break through this barrier obtaining the first interesting trade-offs with polynomially subquadratic space and polynomially sublinear query time. In particular, we show that, for every $0\leq δ\leq 1$, there is a data structure for Gapped String Indexing with either $ ilde{O}(n^{2-δ/3})$ or $ ilde{O}(n^{3-2δ})$ space and $ ilde{O}(|P_1| + |P_2| + n^δ\cdot (occ+1))$ query time, where $occ$ is the number of reported occurrences. As a new tool towards obtaining our main result, we introduce the Shifted Set Intersection problem. We show that this problem is equivalent to the indexing variant of 3SUM (3SUM Indexing). Via a series of reductions, we obtain a solution to the Gapped String Indexing problem. Furthermore, we enhance our data structure for deciding Shifted Set Intersection, so that we can support the reporting variant of the problem. Via the obtained equivalence to 3SUM Indexing, we thus give new improved data structures for the reporting variant of 3SUM Indexing, and we show how this improves upon the state-of-the-art solution for Jumbled Indexing for any alphabet of constant size $σ>5$.
Motivation & Objective
- To overcome the longstanding O(n²) space and O(n) query time barrier in Gapped String Indexing.
- To develop efficient data structures for reporting and existence variants of Gapped String Indexing with improved time-space trade-offs.
- To establish a novel connection between Gapped String Indexing, Shifted Set Intersection, and 3SUM Indexing.
- To improve upon existing bounds for Jumbled Indexing under constant-sized alphabets.
Proposed method
- Introduce the Shifted Set Intersection problem: given sets S₁,…,Sₖ and query (i,j,s), determine if ∃a∈Sᵢ, b∈Sⱼ such that a+s = b.
- Prove that Shifted Set Intersection is equivalent to the indexing variant of 3SUM (3SUM Indexing).
- Design a data structure for Shifted Set Intersection with gaps, enabling efficient query processing.
- Extend the data structure to support the reporting variant, outputting all valid (a,b) pairs.
- Reduce Jumbled Indexing to σ-dimensional 3SUM Indexing using prefix/suffix histograms and universe sparsification.
- Apply the resulting 3SUM Indexing data structure to achieve improved bounds for Gapped String Indexing and Jumbled Indexing.
Experimental results
Research questions
- RQ1Can Gapped String Indexing be solved with polynomially subquadratic space and polynomially sublinear query time?
- RQ2What is the relationship between Shifted Set Intersection and 3SUM Indexing, and can it be exploited for better data structures?
- RQ3Can the new trade-offs for 3SUM Indexing be used to improve existing solutions for Jumbled Indexing?
- RQ4Does the equivalence between Shifted Set Intersection and 3SUM Indexing allow for tighter bounds in string indexing problems?
Key findings
- For every 0 ≤ δ ≤ 1, a data structure for Gapped String Indexing with reporting achieves ˜O(n²−δ/3) space and ˜O(nδ · (occ + 1) + |P₁| + |P₂|) query time.
- An alternative trade-off uses ˜O(n³−2δ) space and ˜O(nδ · (occ + 1) + |P₁| + |P₂|) query time, offering better space usage for larger δ.
- The existence variant achieves ˜O(n²−δ) space and ˜O(n³δ) query time, with occ = 1.
- The paper establishes a tight connection between Shifted Set Intersection and 3SUM Indexing, proving their equivalence.
- The new data structure improves upon the state-of-the-art for Jumbled Indexing on constant-sized alphabets, particularly for σ > 5.
- The results contradict the now-refuted Strong 3SUM Indexing conjecture, demonstrating that subquadratic space and sublinear query time are achievable.
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.