Binomial Tree and Heap: Definition, Merge Operation, and Insertion - Prof. Jun Huan, Study notes of Data Structures and Algorithms

The concept of binomial trees and binomial heaps, focusing on their definition, merge operation, and insertion process. Binomial trees are recursively defined structures with the heap-order property, while binomial heaps are sets of binomial trees with different ranks. The merge operation is used to combine two trees, with rule i for trees of different sizes and rule ii for trees of the same size. The insertion operation recursively applies the merge rules. Useful for students in computer science or mathematics, particularly those studying data structures and algorithms.

Typology: Study notes

Pre 2010

Uploaded on 03/11/2009

koofers-user-s9b
koofers-user-s9b 🇺🇸

10 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Binomial Tree
Definition
B0 is a single node
Bk is defined recursively
Binomial tree has heap-order property
Bk
B0 Bk-1
Binomial heap is a set of binomial trees with different ranks
Binomial Tree Binomial Heap
Yes Yes
Yes Yes
No No
No Yes
13
13
14
13
15 16
8
9
1
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Binomial Tree and Heap: Definition, Merge Operation, and Insertion - Prof. Jun Huan and more Study notes Data Structures and Algorithms in PDF only on Docsity!

Binomial Tree Definition • B 0 is a single node

  • • BBinomial tree has heap-order propertyk is defined recursively

Bk B 0 Bk- Binomial heap is a set of binomial trees with different ranks

Binomial Tree Binomial Heap Yes Yes

Yes Yes

No No

No Yes

B

B

B

B

Rule II: Merge two trees with same size Select the one with the smallest root, and attach the other one to the root as the right most child example 1:

example2:

Insert 6:

DeleteMin:

1.2. Find the Min RootDelete the Root

  1. Merge Example:

Deleting the min:

Merging: Step1: