Imagine you have a bitvector — a sequence of zeroes and ones. Two questions come up constantly:
- rank(i): how many 1s appear in positions 1 through ?
- select(j): what position holds the -th 1?
Answering either question naively means scanning from the start — time. That is unacceptable when is a billion. The obvious fix is to precompute a table of prefix sums, which answers rank in , but the table costs another bits — many times the original data.
Succinct data structures dissolve that trade-off. The landmark result, proved by Guy Jacobson in 1989, is that you can store the bitvector and all the machinery to answer rank and select in time using only bits total — storing the data plus a sub-linear overhead, and nothing more. No pointers, no decompression, no separate index file.
The idea is elegant: organize the precomputed sums at multiple granularities so each level of detail costs only a few bits per block. The blocks fit inside the original data's footprint.
Comments
Loading comments...