Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

More Books

Students also viewed these Databases questions

Question

6.3. Repeat Example 6.1 for .

Answered: 1 week ago

Question

=+7 How has the COVID-19 pandemic impacted the operations of IHRM?

Answered: 1 week ago