Commit f74bb19c authored by Filip Stedronsky's avatar Filip Stedronsky
Browse files

Succinct: init

parent 66411d7c
......@@ -16,7 +16,8 @@ CHAPTERS= \
05-cache \
06-hash \
07-geom \
08-string \
for ch in $(CHAPTERS) ; do $(MAKE) -C $$ch pics ; done
include ../Makerules
\input adsmac.tex
\chapter[succinct]{Space-efficient data structures}
In this chapter, we will explore space-efficient data structures. This may
sound like a boring topic at first -- after all, many of the commonly-used data
sctructures have linear space complexity, which is asymptotically optimal.
However, in this chapter, we shall use a much more fine-grained notion of space
efficiency and measure space requirements in bits.
Imagine we have a universe $X$ and we want a data structure to hold a single
element $x \in X$. For example, $X$ can be the universe of all length-$n$ sequences
of integers from the range $[m]$ and we want a data structure to hold such
a sequence (we shall limit ourselves to finite universes only).
The information-theoretically optimal size of such a data structure is
$OPT := \lceil\log |X|\rceil$ bits (which is essentilly the entropy of
a uniform probability distribution over $X$).
Now we can define three classes of data structures based on their fine-grained space
\defn{An {\I implicit data structure} is one that uses at most $OPT + \O(1)$ bits of space.}
A typical implicit data structure contains just its elements in some order and nothing more.
Examples include sorted arrays and heaps.
\defn{A {\I succinct data structure} is one that uses at most $OPT + {\rm o}(OPT)$ bits of space.}
\defn{A {\I compact data structure} is one that uses at most $\O(OPT)$ bits of space.}
Note that some linear-space data structures are not even compact -- because we are counting
bits now, not words. For example, a binary search tree representing a length-$n$ sequence
of numbers from range $[m]$ needs $\O(n (\log n + \log m))$ bits, whereas $OPT$ is
$n \log m$. For $n >> m$, this does not satisfy the requirements for a compact data
And of course, as with any data structure, we want to be able to perform reasonably
fast operations on these space-efficient data structures.
\section{Succinct representation of strings}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment