Question: Construct an optimal binary search tree for five keys A, B, C, D, E with probabilities p1 = 0.1, p2 = 0.3, p3 = 0.1,

Construct an optimal binary search tree for five keys A, B, C, D, E with probabilities p1 = 0.1, p2 = 0.3, p3 = 0.1, p4 = 0.4, p5 = 0.1. Show(1) the main table; (2) the root table; (3) all computations to fill in the main table and the root table; (4) the optimal binary search tree based on the root table; (5) that the average number of comparisons of your optimal binary search tree is indeed C(1,5).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!