Explaining the Inherent Tradeoffs for Suffix Array Functionality: Equivalences between String Problems and Prefix Range Queries
Dominik Kempa, Tomasz Kociumaka
Abstract
We address a fundamental question in string processing: how much time is needed to access suffix array entries when there is insufficient space to store it in plain form? The suffix array SAT [1 . . n] of a text T of length n is a permutation of 1, . . . , n that encodes the lexicographic ordering of the suffixes of T . While its canonical application is as a pattern matching index, the suffix array's simplicity, space efficiency, and theoretical guarantees have made it a cornerstone of string processing over the past 35 years, with applications spanning data compression, bioinformatics, and information retrieval.
Prior work has developed unidirectional reductions, showing how suffix array queries (given i ∈ [1 . . n], return SAT [i]) can be reduced, among others, to rank queries over the Burrows-Wheeler Transform (BWT). More recently, an alternative family of prefix queries was introduced, along with a reduction that transforms a simple tradeoff for prefix queries-requiring little more than a page to develop-into a suffix array tradeoff that matches all known space and query time bounds, while achieving sublinear construction time. For a binary text T ∈ 0, 1 n , this tradeoff achieves space usage S(n) = O(n) bits, preprocessing time Pt(n) = O(n/ √ log n), preprocessing space Ps(n) = O(n) bits, and query time Q(n) = O(log ϵ n) for any constant ϵ > 0. Despite this progress, a key question remains: can any of these complexities be improved using fundamentally different techniques?
In this work, we address this question as follows:
• We establish the first bidirectional reduction, proving that suffix array queries are, up to an additive O(log log n) term in query time, equivalent to prefix select queries in all four aspects. For a sequence W [1 . . m] of O(log m)-bit strings, a prefix select query, given i ∈ [1 . . m] and a string X, returns the position j of the ith leftmost string W [j] in W with prefix X. Our reduction unifies previous approaches and offers a structured framework for deriving new tradeoffs without sacrificing generality: before this work, prefix select queries constituted merely one approach to efficient suffix array queries, whereas we prove that, up to the O(log log n) additive overhead in query time, they capture all possible suffix array representations.
• We further show that other core string-processing problems-such as inverse suffix array queries, pattern ranking, lexicographic range queries, and pattern SA-interval queries-are also computationally equivalent to distinct types of prefix queries. In total, we identify six fundamental problem pairs, each consisting of a string problem and a corresponding prefix problem, and prove analogous equivalences.
Taken together, our reductions provide a general method for analyzing the efficiency of suffix array and related queries in terms of prefix queries, demonstrating that further improvements to fundamental string problems can be achieved by focusing solely on this recently introduced class of abstract queries.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
2 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Collapsing the Hierarchy of Compressed Data Structures: Suffix Arrays in Optimal Compressed Space cites Dynamic suffix array with polylogarithmic queries and updates
- Collapsing the Hierarchy of Compressed Data Structures: Suffix Arrays in Optimal Compressed Space cites Breaking the 𝒪(n)-Barrier in the Construction of Compressed Suffix Arrays and Suffix Trees
- On the Hardness Hierarchy for the O(n√log n) Complexity in the Word RAM cites Collapsing the Hierarchy of Compressed Data Structures: Suffix Arrays in Optimal Compressed Space
- On the Hardness Hierarchy for the O(n√log n) Complexity in the Word RAM cites Dynamic suffix array with polylogarithmic queries and updates
- On the Hardness Hierarchy for the O(n√log n) Complexity in the Word RAM cites Lempel-Ziv (LZ77) Factorization in Sublinear Time
- On the Hardness Hierarchy for the O(n√log n) Complexity in the Word RAM cites Breaking the 𝒪(n)-Barrier in the Construction of Compressed Suffix Arrays and Suffix Trees
- Lempel-Ziv (LZ77) Factorization in Sublinear Time cites Collapsing the Hierarchy of Compressed Data Structures: Suffix Arrays in Optimal Compressed Space
- Lempel-Ziv (LZ77) Factorization in Sublinear Time cites Breaking the 𝒪(n)-Barrier in the Construction of Compressed Suffix Arrays and Suffix Trees
- Breaking the 𝒪(n)-Barrier in the Construction of Compressed Suffix Arrays and Suffix Trees cites Dynamic suffix array with polylogarithmic queries and updates
- Tight Lower Bounds for Central String Queries in Compressed Space cites Collapsing the Hierarchy of Compressed Data Structures: Suffix Arrays in Optimal Compressed Space
- Tight Lower Bounds for Central String Queries in Compressed Space cites On the Hardness Hierarchy for the O(n√log n) Complexity in the Word RAM
- Tight Lower Bounds for Central String Queries in Compressed Space cites Lempel-Ziv (LZ77) Factorization in Sublinear Time
- Tight Lower Bounds for Central String Queries in Compressed Space cites Breaking the 𝒪(n)-Barrier in the Construction of Compressed Suffix Arrays and Suffix Trees
- Optimal Random Access and Conditional Lower Bounds for 2D Compressed Strings cites Collapsing the Hierarchy of Compressed Data Structures: Suffix Arrays in Optimal Compressed Space
- Optimal Random Access and Conditional Lower Bounds for 2D Compressed Strings cites On the Hardness Hierarchy for the O(n√log n) Complexity in the Word RAM
- Optimal Random Access and Conditional Lower Bounds for 2D Compressed Strings cites Lempel-Ziv (LZ77) Factorization in Sublinear Time
- Optimal Random Access and Conditional Lower Bounds for 2D Compressed Strings cites Breaking the 𝒪(n)-Barrier in the Construction of Compressed Suffix Arrays and Suffix Trees
- Optimal Random Access and Conditional Lower Bounds for 2D Compressed Strings cites Tight Lower Bounds for Central String Queries in Compressed Space
Cited by top-tier papers2
Builds on6
- Collapsing the Hierarchy of Compressed Data Structures: Suffix Arrays in Optimal Compressed SpaceDominik Kempa, Tomasz KociumakaFOCS 2023 · 20 citations
- Breaking the 𝒪(n)-Barrier in the Construction of Compressed Suffix Arrays and Suffix TreesDominik Kempa, Tomasz KociumakaSODA 2023 · 10 citations
- Lempel-Ziv (LZ77) Factorization in Sublinear TimeDominik Kempa, Tomasz KociumakaFOCS 2024 · 2 citations
- On the Hardness Hierarchy for the O(n√log n) Complexity in the Word RAMDominik Kempa, Tomasz KociumakaSTOC 2025
- Dynamic suffix array with polylogarithmic queries and updatesDominik Kempa, Tomasz KociumakaSTOC 2022
Related papers
- Space-Efficient Text Indexing with Mismatches using Function InversionJackson Bibbens, Levi Borevitz, Samuel McCauleySTOC 2026 · 2 citations
- Suffix Rank: a new scalable algorithm for indexing large string collectionsMarina Barsky, Jonathan Gabor, Mariano P. Consens, Alex ThomoVLDB 2020
- Resolution of the Burrows-Wheeler Transform ConjectureDominik Kempa, Tomasz KociumakaFOCS 2020 · 32 citations
- Space-Efficient k-Mismatch Text IndexesTomasz Kociumaka, Jakub RadoszewskiSODA 2026 · 1 citation
- Near-Optimal Quantum Algorithms for Bounded Edit Distance and Lempel-Ziv FactorizationDaniel Gibney, Ce Jin, Tomasz Kociumaka, Sharma V. ThankachanSODA 2024 · 7 citations
