Work Note 5, DM206, fall 2010

Exercises November 18

  1. 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?
  2. Consider the details around maintaining maxLevel for skip lists, i.e., when and how to change it, and how to make sure that the complexity bounds (which are based on L(n)) still hold.
  3. 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 and maintain information to the skip list structure such that n can always be determined in expected time O(1)?
  4. 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.
  5. 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.
  6. Leftover repetition problems from last exercise class.


Last modified: Thu Nov 11 10:38:36 CET 2010
Kim Skak Larsen (kslarsen@imada.sdu.dk)