Table of Contents
Fetching ...

Explaining the Inherent Tradeoffs for Suffix Array Functionality: Equivalences between String Problems and Prefix Range Queries

Dominik Kempa, Tomasz Kociumaka

TL;DR

This work establishes the first bidirectional correspondence between suffix array queries and a broad class of prefix-based queries, showing that answering SA queries for a text $T$ is essentially as hard as solving prefix-select queries on short bitstrings, up to an additive $O(\log\log n)$ term in query time. The authors extend this equivalence to inverse SA queries, pattern ranking, SA-interval queries, and a range of prefix-range queries (range reporting, emptiness, and RMQ variants), identifying six core problem pairs that connect string processing with prefix query models. A central technical tool is alphabet reduction, which reduces alphabets to binary without loss of essential ordering, enabling uniform, compact reductions across all twelve problems. The framework provides a unified foundation for proving optimal tradeoffs and for transferring advances in prefix-query data structures to SA-based string processing problems, with immediate implications for FM-index, CSA, and related compressed text indexing structures. Overall, the paper reframes the fundamental difficulty of SA representations in terms of prefix query complexity, guiding future design and optimization of space-time tradeoffs in suffix-array-like structures.

Abstract

We study the fundamental question of how efficiently suffix array entries can be accessed when the array cannot be stored explicitly. The suffix array $SA_T[1..n]$ of a text $T$ of length $n$ encodes the lexicographic order of its suffixes and underlies numerous applications in pattern matching, data compression, and bioinformatics. Previous work established one-way reductions showing how suffix array queries can be answered using, for example, rank queries on the Burrows-Wheeler Transform. More recently, a new class of prefix queries was introduced, together with reductions that, among others, transform a simple tradeoff for prefix-select queries into a suffix array tradeoff matching state-of-the-art space and query-time bounds, while achieving sublinear construction time. For binary texts, the resulting data structure achieves space $O(n)$ bits, preprocessing time $O(n / \sqrt{\log n})$, preprocessing space of $O(n)$ bits, and query time $O(\log^ε n)$ for any constant $ε> 0$. However, whether these bounds could be improved using different techniques has remained open. We resolve this question by presenting the first bidirectional reduction showing that suffix array queries are, up to an additive $O(\log\log n)$ term in query time, equivalent to prefix-select queries in all parameters. This result unifies prior approaches and shows that essentially all efficient suffix array representations can be expressed via prefix-select structures. Moreover, we prove analogous equivalences for inverse suffix array queries, pattern ranking, lexicographic range, and SA-interval queries, identifying six core problem pairs that connect string and prefix query models. Our framework thus provides a unified foundation for analyzing and improving the efficiency of fundamental string-processing problems through the lens of prefix queries.

Explaining the Inherent Tradeoffs for Suffix Array Functionality: Equivalences between String Problems and Prefix Range Queries

TL;DR

This work establishes the first bidirectional correspondence between suffix array queries and a broad class of prefix-based queries, showing that answering SA queries for a text is essentially as hard as solving prefix-select queries on short bitstrings, up to an additive term in query time. The authors extend this equivalence to inverse SA queries, pattern ranking, SA-interval queries, and a range of prefix-range queries (range reporting, emptiness, and RMQ variants), identifying six core problem pairs that connect string processing with prefix query models. A central technical tool is alphabet reduction, which reduces alphabets to binary without loss of essential ordering, enabling uniform, compact reductions across all twelve problems. The framework provides a unified foundation for proving optimal tradeoffs and for transferring advances in prefix-query data structures to SA-based string processing problems, with immediate implications for FM-index, CSA, and related compressed text indexing structures. Overall, the paper reframes the fundamental difficulty of SA representations in terms of prefix query complexity, guiding future design and optimization of space-time tradeoffs in suffix-array-like structures.

Abstract

We study the fundamental question of how efficiently suffix array entries can be accessed when the array cannot be stored explicitly. The suffix array of a text of length encodes the lexicographic order of its suffixes and underlies numerous applications in pattern matching, data compression, and bioinformatics. Previous work established one-way reductions showing how suffix array queries can be answered using, for example, rank queries on the Burrows-Wheeler Transform. More recently, a new class of prefix queries was introduced, together with reductions that, among others, transform a simple tradeoff for prefix-select queries into a suffix array tradeoff matching state-of-the-art space and query-time bounds, while achieving sublinear construction time. For binary texts, the resulting data structure achieves space bits, preprocessing time , preprocessing space of bits, and query time for any constant . However, whether these bounds could be improved using different techniques has remained open. We resolve this question by presenting the first bidirectional reduction showing that suffix array queries are, up to an additive term in query time, equivalent to prefix-select queries in all parameters. This result unifies prior approaches and shows that essentially all efficient suffix array representations can be expressed via prefix-select structures. Moreover, we prove analogous equivalences for inverse suffix array queries, pattern ranking, lexicographic range, and SA-interval queries, identifying six core problem pairs that connect string and prefix query models. Our framework thus provides a unified foundation for analyzing and improving the efficiency of fundamental string-processing problems through the lens of prefix queries.
Paper Structure (109 sections, 112 theorems, 87 equations, 1 figure, 1 table)

This paper contains 109 sections, 112 theorems, 87 equations, 1 figure, 1 table.

Key Result

Theorem 1.1

The problems of IndexingforSuffixArrayQueries and IndexingforPrefixSelectQueries are equivalent in the following sense. Consider any data structure that, for an input of at most $N$ bits to one of the problems, achieves the following complexities: Then, for every integer $N'$, there exists $N=\mathcal{O}(N')$ such that, given an input instance of at most $N'$ bits to the other problem, we can c

Figures (1)

  • Figure 1: A list of all sorted suffixes of $T = \texttt{bbabaababababaababa}$ along with the suffix array.

Theorems & Definitions (245)

  • Theorem 1.1: Main result of this paper
  • Definition 2.1: Pattern occurrences and SA-interval
  • Definition 2.2: Suffix array and its inverse sa
  • Remark 2.3
  • Definition 2.4: Lexicographical range
  • Remark 2.5
  • Definition 2.6: Rank and selection queries
  • Theorem 2.7: Rank and selection queries in bitvectors WaveletSuffixTreeClark98Jac89MunroNV16
  • Definition 2.8: Prefix rank and selection queries breaking
  • Definition 2.9: Prefix range minimum queries (prefix RMQ) sublinearlz
  • ...and 235 more