English

More Haste, Less Waste: Lowering the Redundancy in Fully Indexable Dictionaries

Data Structures and Algorithms 2009-02-17 v1

Abstract

We consider the problem of representing, in a compressed format, a bit-vector SS of mm bits with nn 1s, supporting the following operations, where b{0,1}b \in \{0, 1 \}: rankb(S,i)rank_b(S,i) returns the number of occurrences of bit bb in the prefix S[1..i]S[1..i]; selectb(S,i)select_b(S,i) returns the position of the iith occurrence of bit bb in SS. Such a data structure is called \emph{fully indexable dictionary (FID)} [Raman et al.,2007], and is at least as powerful as predecessor data structures. Our focus is on space-efficient FIDs on the \textsc{ram} model with word size Θ(lgm)\Theta(\lg m) and constant time for all operations, so that the time cost is independent of the input size. Given the bitstring SS to be encoded, having length mm and containing nn ones, the minimal amount of information that needs to be stored is B(n,m)=log(mn)B(n,m) = \lceil \log {{m}\choose{n}} \rceil. The state of the art in building a FID for SS is given in [Patrascu,2008] using B(m,n)+O(m/((logm/t)t))+O(m3/4)B(m,n)+O(m / ((\log m/ t) ^t)) + O(m^{3/4}) bits, to support the operations in O(t)O(t) time. Here, we propose a parametric data structure exhibiting a time/space trade-off such that, for any real constants 0<δ1/20 < \delta \leq 1/2, 0<\eps10 < \eps \leq 1, and integer s>0s > 0, it uses B(n,m)+O(n1+δ+n(mns)\eps) B(n,m) + O(n^{1+\delta} + n (\frac{m}{n^s})^\eps) bits and performs all the operations in time O(sδ1+\eps1)O(s\delta^{-1} + \eps^{-1}). The improvement is twofold: our redundancy can be lowered parametrically and, fixing s=O(1)s = O(1), we get a constant-time FID whose space is B(n,m)+O(m\eps/\polyn)B(n,m) + O(m^\eps/\poly{n}) bits, for sufficiently large mm. This is a significant improvement compared to the previous bounds for the general case.

Keywords

Cite

@article{arxiv.0902.2648,
  title  = {More Haste, Less Waste: Lowering the Redundancy in Fully Indexable Dictionaries},
  author = {Roberto Grossi and Alessio Orlandi and Rajeev Raman and S. Srinivasa Rao},
  journal= {arXiv preprint arXiv:0902.2648},
  year   = {2009}
}