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 $[\alpha, \beta]$, called gap range, we can quickly find occurrences of $P_1$ and $P_2$ in $S$ with distance in $[\alpha, \beta]$. 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 $\Omega(n^2)$ space and $\tilde{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 \delta \leq 1$, there is a data structure for Gapped String Indexing with either $\tilde{O}(n^{2-\delta/3})$ or $\tilde{O}(n^{3-2\delta})$ space and $\tilde{O}(|P_1| + |P_2| + n^{\delta}\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 $\sigma>5$.
翻译:在带间隙字符串索引问题中,目标是对长度为$n$的字符串$S$进行紧凑表示,使得对于任意查询(由两个字符串$P_1$和$P_2$(称为模式)、以及整数区间$[\alpha, \beta]$(称为间隙范围)组成),可以快速找到$S$中距离在$[\alpha, \beta]$范围内的$P_1$和$P_2$出现位置。该问题是计算生物学和文本挖掘领域的核心问题,因此受到广泛研究关注,包括参数化方法和启发式方法。尽管备受关注,带间隙字符串索引目前已知的最优时空权衡仅为直接的$O(n)$空间与$O(n+occ)$查询时间,或$\Omega(n^2)$空间与$\tilde{O}(|P_1| + |P_2| + occ)$查询时间。我们突破了这一屏障,首次获得了具有多项式次二次空间和多项式次线性查询时间的非平凡权衡。具体而言,我们证明:对于任意$0\leq \delta \leq 1$,存在一种带间隙字符串索引的数据结构,其空间复杂度为$\tilde{O}(n^{2-\delta/3})$或$\tilde{O}(n^{3-2\delta})$,查询时间复杂度为$\tilde{O}(|P_1| + |P_2| + n^{\delta}\cdot (occ+1))$,其中$occ$为报告的出现次数。作为实现主要结果的新工具,我们引入了移位集合交集问题。我们证明该问题等价于3SUM的索引变体(3SUM索引)。通过一系列归约,我们得到了带间隙字符串索引问题的解。此外,我们增强了用于判定移位集合交集的数据结构,使其能够支持该问题的报告变体。通过获得的与3SUM索引的等价关系,我们为3SUM索引的报告变体提供了新的改进数据结构,并展示了该结果如何改进任意常量大小字母表$\sigma>5$下的乱序索引问题的现有最优解。