Hints to Exercises 8.3
1. Continue applying formula (8.8) as prescribed by the algorithm.
2. a. The algorithm’s time efficiency can be investigated by following the
standard plan of analyzing the time efficiency of a nonrecursive algorithm.
5. If the assertion were true, would we not have a simpler algorithm for
constructing an optimal binary search tree?
6. The structure of the tree should simply minimize the average depth of its
nodes. Do not forget to indicate a way to distribute the keys among the
nodes of the tree.
9. Assume that 1 are distinct keys ordered from the smallest to the
largest, 1 are the probabilities of searching for them, and 0
1
are probabilities of unsuccessful searches for keys in intervals (−∞
1)
(1
2) (∞)respectively; (1+··· +)+(0+···+)=1
Set up a recurrence relation similar to recurrence (8.8) for the expected