Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

E ach part (a and b) in this question is independent! a) Consider a binomial min-heap with n nodes! We know that the maximum key

image text in transcribed

E ach part (a and b) in this question is independent! a) Consider a binomial min-heap with n nodes! We know that the maximum key is at the root of a binomial tree. What is the nature of the number n (by nature of a number we mean for example: is it a prime number, a power of 3 , equal to 45 , divisible by 7 , etc )? D efine n 's most general, most comprehensive nature to cover all such binomial heaps. b) Consider a binomial max-heap BH with k=2n+2m14 nodes where m>n. 1. Which binomial trees is BH composed of? 2. The minimum key in BH is in the most crowded depth level of its largest binomial tree. What is the exact number of nodes you may have to look for the minimum key? (Hint: figure out where the min. key may only exist in a max-heap?) 3. A binomial heap BHresresultsfrommergingBHabovewithanothermax-heapBH1 with 2n1++2m+3 keys after two delete-max operations at BH where the maximum key is at the root of Bm and the second maximum at the root of Bn1 (i.e., first the two deletemaxs then the merging). i. How many nodes does BHres have? ii. What binomial trees is BHres composed of

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_2

Step: 3

blur-text-image_3

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

Professional IPhone And IPad Database Application Programming

Authors: Patrick Alessi

1st Edition

0470636173, 978-0470636176

More Books

Students also viewed these Databases questions