Question: (10pt) Consider a special type of tree data structure called the Short Tree, which is defined as follows. Each leaf node of a Short Tree

(10pt) Consider a special type of tree data structure called the Short Tree, which is defined as follows. Each leaf node of a Short Tree is associated with a distinct key, i.e., no two nodes of the tree have the same key. Each non-leaf node of a Short Tree is associated with a pair of keys, vmin and vmax, indicating the smallest key vmin and the largest key vmax in its sub-tree. Let v be an aibitrary node of a Short Tree. Let m be the total number of leaf nodes in the sub-tree rooted at v. For ease of explanation, let the keys be {k0 < k1 < k2 < ... < km1}. Then v has ( pm) children. Let the children be indexed 0, 1, ..., pm 1, then the jth child is responsible for storing the keys within the range {kj pm, ..., k(j+1)pm1}, and has a min of kj pm and a max of k(j+1)pm1. Note that the above definiion is applied recursively to the children of v. Answer the following questions: 12 (a) Let the keys of a particular Short Tree be 0, 1, 2, ..., 255. What is the height of the tree? (b) What is the assmptotic height of a Short Tree with a total of n keys {0, 1, ..., n 1}?

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!