Needs to Solve this Question

Please any one write the ans to this question,,,,

Q) Suppose one modifies the definition of an AVL tree in the following manner: The balance condition becomes |height(L(x)) − height(R(x))| <= 2, for each node x of the tree, i.e., the heights of the left and right subtrees have to differ by at most 2 (rather than at most 1, as

in the standard definition). Working with this modified definition:

(a) Draw one legal AVL tree and one illegal AVL tree.

(b) If n(h) is the smallest number of nodes in an AVL tree of height h, write a recurrence defining n(h).

(c) From the above recurrence, deduce that n(h)>= c raisedto h  for an appropriate constant c > 1.

(d) Explain how the fact that n(h) is at least exponential in h implies that the balance condition given above forces the tree to be “balanced,” i.e., to have height O(log n), if n is the number of nodes in the tree.


Daha fazlasını gör: tree node, recurrence tree, o log n, number of nodes in a tree, node of a tree, node in tree, any question, question, d tree, condition, AVL tree, number draw, given manner, suppose, Fact, write nodes, nodes, height, suppose nodes, constant, tree number, write proportion represent situation solve proportion answer question, legal tree, property needs development yorkshire area, list smallest villages world

İşveren Hakkında:
( 0 değerlendirme ) New York, United States

Proje NO: #97685

1 freelancer is bidding on average $30 for this job


Greetings, Please view PMB. Thanks.

in %bids___i_period_sub_35% gün içinde30%project_currencyDetails_sign_sub_37% %project_currencyDetails_code_sub_38%
(22 Değerlendirme)