Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Draw an AVL tree of height 0,1,2,3, 4 with a minimum number of nodes 2. (a) The minimum number of nodes S(h) of the
1. Draw an AVL tree of height 0,1,2,3, 4 with a minimum number of nodes 2. (a) The minimum number of nodes S(h) of the AVL tree of height h is given by the recurrence S(h) = S(h-1) + S(h-2) + 1 with S(0) = 1 and S(1) = 2 . Tabulate the values for h 1, . . . , 20. (b) Try to find a value a > 1, such that s(h) ah for all the values in the table. (a) For 100 items? (b) For 500 items? 4. There are 300 elements which need to be stored in an AVL tree. (a) What is the height of the AVL tree in the worst case? (b) What is the height of the AVL tree in the best case? 5. There are 300 elements which need to be stored in a 2-3 tree. (a) What is the height of the 2-3 tree in the worst case? (b) What is the height of the 2-3 tree in the best case? 6. Consider a 2-3 Tree of height 10. What is the minimum and maximum number of elements which can be stored? 7. Consider a B tree of order 5 with height 3. What is the minimum and maximum number of elements which can be stored? 1. Draw an AVL tree of height 0,1,2,3, 4 with a minimum number of nodes 2. (a) The minimum number of nodes S(h) of the AVL tree of height h is given by the recurrence S(h) = S(h-1) + S(h-2) + 1 with S(0) = 1 and S(1) = 2 . Tabulate the values for h 1, . . . , 20. (b) Try to find a value a > 1, such that s(h) ah for all the values in the table. (a) For 100 items? (b) For 500 items? 4. There are 300 elements which need to be stored in an AVL tree. (a) What is the height of the AVL tree in the worst case? (b) What is the height of the AVL tree in the best case? 5. There are 300 elements which need to be stored in a 2-3 tree. (a) What is the height of the 2-3 tree in the worst case? (b) What is the height of the 2-3 tree in the best case? 6. Consider a 2-3 Tree of height 10. What is the minimum and maximum number of elements which can be stored? 7. Consider a B tree of order 5 with height 3. What is the minimum and maximum number of elements which can be stored
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started