December2015 cs Q21

0. Let n = 4 and (a1, a2, a3, a4) = (do, if, int, while).Let p(1 : 4) = (3 / 8, 3 / 8, 1 /8, 1 / 8) and Let q(1 : 4) = (2 / 8, 3 / 8, 1 / 8, 1 / 8, 1 / 8) where p(i) and q(i) denotes the probability with which we search a and the identifier x being searched satisfy ai < x < ai+1 respectively. The optimal search tree is given by

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *