Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
ds2-notes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
datovky
ds2-notes
Commits
f74bb19c
Commit
f74bb19c
authored
3 years ago
by
Filip Stedronsky
Browse files
Options
Downloads
Patches
Plain Diff
Succinct: init
parent
66411d7c
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Makefile
+2
-1
2 additions, 1 deletion
Makefile
fs-succinct/Makefile
+3
-0
3 additions, 0 deletions
fs-succinct/Makefile
fs-succinct/succinct.tex
+46
-0
46 additions, 0 deletions
fs-succinct/succinct.tex
with
51 additions
and
1 deletion
Makefile
+
2
−
1
View file @
f74bb19c
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
fs-succinct/Makefile
0 → 100644
+
3
−
0
View file @
f74bb19c
TOP
=
..
include
../Makerules
This diff is collapsed.
Click to expand it.
fs-succinct/succinct.tex
0 → 100644
+
46
−
0
View file @
f74bb19c
\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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment