diff --git a/Makefile b/Makefile index cf587e7af46ec9b8e521951c81268921e5efbd7c..459f511555a1c9824f832491015f55e38ff15a5f 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,8 @@ CHAPTERS= \ 05-cache \ 06-hash \ 07-geom \ - 08-string + 08-string \ + fs-succinct chapters: for ch in $(CHAPTERS) ; do $(MAKE) -C $$ch pics ; done diff --git a/fs-succinct/Makefile b/fs-succinct/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..ba6c63ec5ded7d730418a9f14feceb7ebe02fa5e --- /dev/null +++ b/fs-succinct/Makefile @@ -0,0 +1,3 @@ +TOP=.. + +include ../Makerules diff --git a/fs-succinct/succinct.tex b/fs-succinct/succinct.tex new file mode 100644 index 0000000000000000000000000000000000000000..5a07c66f128c8a0019436032fc2d3546a8be71e4 --- /dev/null +++ b/fs-succinct/succinct.tex @@ -0,0 +1,46 @@ +\ifx\chapter\undefined +\input adsmac.tex +\singlechapter{50} +\fi + +\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 +efficiency: + +\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 +structure. + +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} + + +\endchapter