Work Note 3, DM803, fall 2016
Exercises September 19
-
Sometimes we are interested in having a next operation
which, given a reference to an element, returns a reference
to the element with the next higher key.
How could this be implemented in a tree structure such as
red-black trees, for example. How would it be done for skip lists?
What about previous?
-
Consider the implementation of meld
and split for skip lists, and how maxLevel should be adjusted
to be close to L(n). Importantly, in order to compute L(n),
we need to know n. How can you add information
to the skip list structure and maintain this such that n can always be
determined in expected time O(1)?
Could we do something reasonable without n?
-
Prove that one gets the best constant for the expected search time
by choosing p=1/e as claimed in Table 1 of [P89].
Then explain all the other constants in the table.
You need to manipulate the logarithmic expressions some to
reverse engineer the table data.
-
Consider a standard binary heap.
Is it possible to make an O(n)
traversal of the heap and print
all the priorities in non-decreasing order
during that traversal? Argue your position.
-
Leftover problems from last exercise class.
Lecture September 22 [Changed to Sept. 23]
-
Universal hashing, [CLRS09] section 11.3.3.
-
Perfect hashing, [CLRS09] section 11.5.
Last modified: Tue Sep 20 08:58:49 CEST 2016
Kim Skak Larsen
(kslarsen@imada.sdu.dk)