Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions