From f74bb19c873a899695f9ec95e86c8b6e766d4d63 Mon Sep 17 00:00:00 2001
From: Filip Stedronsky <p@regnarg.cz>
Date: Sat, 28 Aug 2021 12:28:15 +0200
Subject: [PATCH] Succinct: init

---
 Makefile                 |  3 ++-
 fs-succinct/Makefile     |  3 +++
 fs-succinct/succinct.tex | 46 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 51 insertions(+), 1 deletion(-)
 create mode 100644 fs-succinct/Makefile
 create mode 100644 fs-succinct/succinct.tex

diff --git a/Makefile b/Makefile
index cf587e7..459f511 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 0000000..ba6c63e
--- /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 0000000..5a07c66
--- /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
-- 
GitLab