Rank and Select Operations on Bit Strings

  • Raman R
N/ACitations
Citations of this article
2Readers
Mendeley users who have this article in their library.
Get full text

Abstract

Synonyms: Binary bit-vector, compressed bit-vector, rank and select dictionary, fully indexable dictionary (FID). 1 PROBLEM DEFINITION Given a static sequence b = b 1. .. b m of m bits, to preprocess the sequence and to create a space-efficient data structure that supports the following operations rapidly: rank 1 (i) takes an index i as input, 1 ≤ i ≤ m, and returns the number of 1s among b 1. .. b i. select 1 (i) takes an index i ≥ 1 as input, and returns the position of the i-th 1 in b, and −1 if i is greater than the number of 1s in b. The operations rank 0 and select 0 are defined analogously for the 0s in b. As rank 0 (i) = i − rank 1 (i), one considers just rank 1 (abbreviated to rank), and refers to select 0 and select 1 collectively as select. In what follows, |x| denotes the length of a bit sequence x and w(x) denotes the number of 1s in it. b is always used to denote the input bit sequence, m to denote |b| and n to denote w(b). Models of Computation, Time and Space Bounds. Two models of computation are commonly considered. One is the unit-cost RAM model with word size O(lg m) bits [1]. The other model, which is particularly useful for proving lower bounds, is the bit-probe model, where the data structure is stored in bit-addressable memory, and the complexity of answering a query is the worst-case number of bits of the data structure that are probed by the algorithm to answer that query. In the RAM model, the algorithm can read O(lg m) consecutive bits in one step, so supporting all operations in O(1) time on the RAM model implies a solution that uses O(lg m) bit-probes, but the converse is not true. This entry considers three variants of the problem: in each variant, rank and select must be supported in O(1) time on the RAM model, or in O(lg m) bit-probes. However, the use of memory varies: Problem 1 (Bit-Vector). The overall space used must be m + o(m) bits. Problem 2 (Bit-Vector Index). b is given in read-only memory and the algorithm can create auxiliary data structures (called indices) which must use o(m) bits. Indices allow the representation of b to be de-coupled from the auxiliary data structure, e.g., b can be stored (in a potentially highly compressed form) in a data structure such as that of 1

Cite

CITATION STYLE

APA

Raman, R. (2015). Rank and Select Operations on Bit Strings. In Encyclopedia of Algorithms (pp. 1–6). Springer Berlin Heidelberg. https://doi.org/10.1007/978-3-642-27848-8_332-2

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free