Problem 4. 15.5-2 p.363 Opt bin search tree
We determine the cost and structure of an optimal binary search tree for a set of n = 7 keys with the following probabilities:
i 0 1 2 3 4 5 6 7
pi 0.04 0.06 0.08 0.02 0.10 0.12 0.14
qi 0.06 0.06 0.06 0.06 0.05 0.05 0.05 0.05