{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

C19-binomial

# C19-binomial - Chapter 19 Binomial Heaps We will study...

This preview shows pages 1–7. Sign up to view the full content.

Chapter 19: Binomial Heaps We will study another heap structure called, the binomial heap. The binomial heap allows for efficient union, which can not be done efficiently in the binary heap. The extra cost paid is the minimum operation, which now requires O (log n ). 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Comparison of Efficiency Binary Binomial Procedure (worst- (worst- case) case) Make - Heap Θ(1) Θ(1) Insert Θ(lg n ) O (lg n ) Minimum Θ(1) O (lg n ) Extract - Min Θ(lg n ) Θ(lg n ) Union Θ( n ) O (lg n ) Decrease - Key Θ(lg n ) Θ(lg n ) Delete Θ(lg n ) Θ(lg n ) 2
Definition A binomial tree B k is an ordered tree defined recursively. B 0 consists of a single node. For k 1, B k is a pair of B k - 1 trees, where the root of one B k - 1 becomes the leftmost child of the other. 3

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
B 1 B 2 B 3 B 4 B k B k-1 B k-1 B 0 4
Properties of Binomial Trees Lemma A For all integers k 0, the following properties hold: 1. B k has 2 k nodes. 2. B k has height k . 3. For i = 0 , . . . , k , B k has exactly k i nodes at depth i . 4. The root of B k has degree k and all other nodes in B k have degree smaller than k . 5. If k 1, then the children of the root of B k are B k - 1 , B k - 2 , · · · , B 0 from left to right. Corollary B The maximum degree of an n -node binomial tree is lg n . 5

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Properties of Binomial Trees For i = 0 , . . . , k , B k has exactly k i nodes at depth i .
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern