6.851: Advanced Data Structures
Spring 2010
Lecture 10 — March 8, 2010
Prof. Erik Demaine
Scribe: Nicholas Zehender
1
Overview
In the last lecture we covered van Emde Boas and
y
fast trees, integer data structures which support
insert, delete, predecessor, and successor operations in log(
w
) time. These data structures are based
on the Word RAM model, where we can manipulate a constant number of
w
bit words in constant
time.
In this lecture we covered fusion trees, as described by Fredman and Willard [1]. A fusion tree is a
static data structure storing
n w
bit integers which supports predecessor and successor queries in
O
(log
w
n
) time per query and
O
(
n
) space. There is also a dynamic version of fusion trees which
get
O
(
log
w
(
n
) +
log
(
log
(
n
))) for updates, as described by Andersson and Thorup [2], but we did
not cover this. Depending on whether
n
is small or large compared to
w
, we can use fusion trees or
van Emde Boas trees, and our query time will be
O
(min
log
n
log
w
,
log
w
). This minimum will never
be greater than
O
(
√
log
n
), giving us a better than logarithmic bound which only depends on
n
.
2
Fusion Trees
A fusion tree is a Btree with a branching factor of
w
1
/
5
. The depth of such a tree is log
w
1
/
5
(
n
) =
log(
n
)
/
log(
w
1
/
5
) = 5 log(
n
)
/
log(
w
).
In order to actually achieve
O
(log(
n
)
/
log(
w
)) time for queries, we must deal with each node we
encounter in constant time.
However, there are
w
1
/
5
keys, each
w
bits long, in each node:
in
constant time, we can only do a constant number of operations on a constant number of
w
bit
words. To solve this problem, we will only compare the “interesting bits” of the keys.
2.1
Interesting bits
Consider what a trie containing the keys would look like. This trie would have height
w
, the length
of the keys, and would have
k
=
O
(
w
1
/
5
) leaves (since the keys are distinct).
“Interesting bits” are bits which correspond to levels in this trie with branching nodes—these are
the bits we will look at in order to distinguish keys.
Since our trie has
k
leaves, it has
k

1
branching nodes, and at most
k

1 interesting bits (since multiple branching nodes might be on
the same level). We will call the indices of the interesting bits
b
0
through
b
r

1
.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Fall '10
 ErikDemaine
 Graph Theory, Data Structures, Arne Andersson

Click to edit the document details