Question: Let 1 < 2 < 3 < 4 < 5 < 6 be 6 numbers accessible with the following probabilities: 1 = 2 2 0

Let 1<2<3<4<5<6 be 6 numbers accessible with the following probabilities: 1=220,2=120,3=220,4=520,5=120 and 6=320. Let 0 be the probability of searching for an item <1,6 the probability of searching for an item >6, and the probability of searching for an item between and +1 for =1,2,3,4,5. Take 0=6=0,1=220 and =120 for i=2,3,4,5. You are to construct an optimal binary search tree. a. Write down a table for the 's, and a table for the 's and their corresponding 's as defined in the algorithm for optimal binary search trees. b. Construct the optimal binary search tree.

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 Programming Questions!