🤖 AI Summary
This work investigates whether suffix array (SA) and inverse suffix array (ISA) queries exhibit symmetric complexity under identical asymptotic space constraints. We propose a novel compressed encoding that supports ISA queries directly—without explicitly storing the Burrows–Wheeler transform (BWT)—by leveraging packed text representations, an enhanced LF mapping, and information-theoretic compression techniques. Our method achieves ISA queries in $O(\tau + \log\log n / \log\log\sigma)$ time within $(1+1/\tau+o(1))n\log\sigma$ bits of space, substantially outperforming existing compressed indexes. Moreover, we establish for the first time a lower bound showing that SA queries cannot be answered in $\log^{o(1)} n$ time, thereby revealing an inherent asymmetry between the query complexities of SA and ISA.
📝 Abstract
The suffix array ($\SA$) and inverse suffix array ($\ISA$) are fundamental data structures in string algorithms. Given a text of length $n$ over an integer alphabet of size $σ$, explicitly storing these structures requires $Θ(n\log n)$ bits, motivating compressed representations that approach the information-theoretic minimum of $n\logσ$ bits. Two landmark solutions are the FM-index, which achieves succinct space and supports $\SA$ and $\ISA$ queries in roughly logarithmic time, and the Compressed Suffix Array (CSA), which uses $O(n\logσ)$ bits and answers both queries in $O(\log_σ^εn)$ time. Nearly all subsequent compressed indexes, including entropy-compressed and repetitiveness-aware variants, support $\SA$ and $\ISA$ using essentially the same techniques, leading to similar space--time trade-offs. This raises a fundamental question: under the same asymptotic space bound, do $\SA$ and $\ISA$ have the same inherent query complexity? We provide evidence that this symmetry is not intrinsic. Under an $O(n\logσ)$-bit space bound, we show that $\SA$ queries are unlikely to admit $\log^{o(1)} n$ query time, suggesting that improving the classical CSA bound would require a major breakthrough. In contrast, we present a new encoding supporting $\ISA$ queries in $O(τ+\log\log n/\log\logσ)$ time using $(1+1/τ+o(1))n\logσ$ bits, for any $τ\ge1$. Our main insight is that the $\LF$-mapping, traditionally implemented using the Burrows--Wheeler Transform, can be adapted to support $\ISA$ queries directly from the packed text, eliminating the need to store the BWT while achieving substantially faster query times.