## Abstract

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 P1 and P2, called patterns, and an integer interval [α, β], called gap range, we can quickly find occurrences of P1 and P2 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 Õ(|P1| + |P2| + 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 ≤ δ ≤ 1, there is a data structure for Gapped String Indexing with either Õ(n^{2−}δ/^{3}) or Õ(n^{3−2δ}) space and Õ(|P1|+ |P2|+ n^{δ} · (occ + 1)) query time, where occ is the number of reported occurrences. As a new fundamental tool towards obtaining our main result, we introduce the Shifted Set Intersection problem: preprocess a collection of sets S1, ..., S_{k} of integers such that for any query consisting of three integers i, j, s, we can quickly output YES if and only if there exist a ∈ Si and b ∈ Sj with a + s = b. We start by showing that the Shifted Set Intersection problem is equivalent to the indexing variant of 3SUM (3SUM Indexing) [Golovnev et al., STOC 2020]. We then give a data structure for Shifted Set Intersection with gaps, which entails 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, i.e., outputting all certificates in the affirmative case. 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 [Chan and Lewenstein, STOC 2015] for any alphabet of constant size σ > 5.

Original language | English |
---|---|

Title of host publication | 41st International Symposium on Theoretical Aspects of Computer Science, STACS 2024 |

Editors | Olaf Beyersdorff, Mamadou Moustapha Kante, Orna Kupferman, Daniel Lokshtanov |

Publisher | Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing |

ISBN (Electronic) | 9783959773119 |

DOIs | |

State | Published - Mar 2024 |

Event | 41st International Symposium on Theoretical Aspects of Computer Science, STACS 2024 - Clermont-Ferrand, France Duration: 12 Mar 2024 → 14 Mar 2024 |

### Publication series

Name | Leibniz International Proceedings in Informatics, LIPIcs |
---|---|

Volume | 289 |

ISSN (Print) | 1868-8969 |

### Conference

Conference | 41st International Symposium on Theoretical Aspects of Computer Science, STACS 2024 |
---|---|

Country/Territory | France |

City | Clermont-Ferrand |

Period | 12/03/24 → 14/03/24 |

### Bibliographical note

Publisher Copyright:© Philip Bille, Inge Li Gørtz, Moshe Lewenstein, Solon P. Pissis, Eva Rotenberg, and Teresa Anna Steiner; licensed under Creative Commons License CC-BY 4.0.

## Keywords

- data structures
- indexing with gaps
- string indexing
- two patterns