843 views

1 Answer

Best answer
2 votes
2 votes
The minimum number of nodes in an AVL tree for a tree with a height h. The following equation is the recursive call of the N(h) function. formula N(h)=1+N(h-1)+N(h-2) Since we know that N(0)=1 ,N(1) = 2, N(2) = 4

Since h = 8

N(3)= 1+ N(2)+N(1)= 1+2+4=7

N(4) = 1+N(3)+N(2)=1+7+4=12

N(5)= 1+N(4)+N(3)= 1+12+7=20

N(6)=1+N(5)+N(4)= 1+20+12= 33

N(7)=N(6)+N(5)+1= 1+33+20=54

N(8)=1+N(7)+N(6)= 1+54+33=88

Related questions

3 votes
3 votes
1 answer
1
hrcule asked Jul 16, 2018
2,770 views
Let T be a binary search tree with n nodes and Sn be the average number of comparisons required for successful search and Un be the average number of comparison required ...
4 votes
4 votes
0 answers
2
AnilGoudar asked Jan 10, 2018
3,338 views
When node 50 will be deleted, what will be resultant AVL tree?
1 votes
1 votes
0 answers
3
atul_21 asked Jan 1, 2018
1,366 views
Can anyone please explain ?? What does R+1,L+1 or R+1,L-1 means ??
4 votes
4 votes
1 answer
4
Manu Thakur asked Jul 27, 2017
6,974 views
What is the max possible height of an AVL tree with 20 nodes?a. 4b.5c.6d.7 In my opinion answer should be b.5 because height of a tree with 1 node is 0 not 1, and recurre...