689 views
1 votes
1 votes
The minimum number of node in an AVL Tree of height $10$ is ____________

1 Answer

Best answer
2 votes
2 votes

AVL Tree: 

  • AVL tree is the self-balancing Binary Search Tree.
  • In an AVL tree, the heights of the two child subtrees of any node differ by at most one.
    • Height(LST)-Height(RST) =−1,0,1
  • Rebalancing is needed at any time if they differ by more than one.

Using the recursive function N(h) = 1 + N(h-1) + N(h-2) we can find the minimum number of nodes in any given AVL tree of height h.

  • We know that 
    • N(0) = 1
    • N(1) = 2
    • N(2) = 4
    • 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) = 1 + N(6) + N(5)
      • => 1 + 33 + 20 = 54
    • N(8) = 1 + N(7) + N(6)
      • => 1 + 54 + 33 = 88
    • N(9) = 1 + N(8) + N(7)
      • => 1 + 88 + 54 = 143
    • N(10) = 1 + N(9) + N(8)
      • => 1 + 143 + 88 = 232
edited by

Related questions

1 votes
1 votes
1 answer
1
kd..... asked Apr 13, 2019
788 views
here what to do first as FIZZA and IMRAN both are unbalanced than either to do RR rotation from FIZZA-IMRAN-NAVEEN or RL rotation from IMRAN-NAVEEN-LOVELY
1 votes
1 votes
1 answer
2
Rahul_Rathod_ asked Dec 28, 2018
1,067 views
what is the maximum possible hight of AVL tree with 54 node?is there any general method to solve this question?
7 votes
7 votes
9 answers
3
syncronizing asked Sep 15, 2018
8,924 views
The number of different orders are possible for elements 1, 2, 3, 4, 5, 6, 7 to be inserted in to empty AVL tree such that no rotation will be done and element ‘4’ is...
1 votes
1 votes
2 answers
4