Rank-Select Indices Without Tears
arXiv:1709.02377
Abstract
A rank-select index for a sequence of bits is a data structure that, if provided with an operation to access arbitrary consecutive bits of in constant time (thus is stored outside of the data structure), can compute for given and for given . We describe a new rank-select index that, like previous rank-select indices, occupies bits and executes and queries in constant time. Its derivation is intended to be particularly easy to follow and largely free of tedious low-level detail, its operations are given by straight-line code, and we show that it can be constructed in time.