Work Note 4, DM803, fall 2014

Lecture September 23

Exercises September 24

  1. Finish-up from previous notes: The PQ variant in Problem 7 from September 10, and a discussion of computational models based on Problem 6 from September 10 and Problem 5 from September 17.
  2. Argue that a ½-weight-balanced Scapegoat tree has minimal height.
  3. Use illustrations to go through the recursive method for the restructuring of a subtree of a Scapegoat tree which is used in Section 6.1, and make it clear which references must be maintained during the process.
  4. In Scapegoat trees we often need to know the sizes of subtrees. Instead of computing these, we could consider storing these values in the nodes. Consider the pros & cons of this.
  5. One could also register the potential of a node with that node. What could that be used for?
  6. Make a sketch of how the insertion procedure should be coded. Note that there are no parents pointers. Assume that you have the following procedures available: restructure(T) restructures the subtree T and count(T) counts the nodes in the subtree T.


Last modified: Wed Sep 17 11:31:21 CEST 2014
Kim Skak Larsen (kslarsen@imada.sdu.dk)