Background: 18.1, 18.2.
Due October 23rd:
- 6.1: Last time, you created a binary search tree from the letters
of the word ``algorithm.'' Do it again, and annotate the tree with
the number of credits the splay analysis would assign to each node.
Now splay on ``m.'' What is the depth of the resulting tree? Where
are the credits now?
- 6.2: Use the amortized analysis template to argue that we can
satisfy a sequence of n operations to a heap (initially empty) in
amortized time for inserts and O(1) amortized time for
delete-max. - 6.3: Give worst-case bounds for executing min, max, min, max, min,
max, ... k times on a balanced binary search tree and a splay tree.
Which is asymptotically more efficient if
?
Up: HOMEWORK
Previous: Homework 5