Fast Compressed Self-Indexes with Deterministic Linear-Time Construction
Ian Munro, Gonzalo Navarro, and Yakov Nekrich
We introduce a compressed suffix array representation that, on a text
T of length n over an alphabet of size s, can be built in
O(n) deterministic time, within O(n log s) bits of working space,
and counts the number of occurrences of any pattern P in T in time
O(|P| + log log_w s) on a RAM machine of w = Omega(log n)-bit
words. This time is almost optimal for large alphabets (log s = Theta(log
and it outperforms all the other compressed indexes that can be built in
deterministic time, as well as some others. The only faster indexes can be
built in linear time only in expectation, or require Theta(n log n) bits.
For smaller alphabets, where log s = o(log n), we show how, by using
space proportional to a compressed representation of the text, we can build in
linear time an index that counts in time O(|P|/ log_s n +
log_s^e n) for any constant e > 0. This is almost
RAM-optimal in the typical case where w = Theta(log n).