Binomial Heaps

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/21

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 6:50 PM on 9/14/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

22 Terms

1
New cards

Priority Queue Abstract Data Type

  • Object: Set S of elements with “keys” (“priority”) that can be compared

  • Operations: Insert(S,x), Max(S), Extract_Max(S)


2
New cards

What operation does Priority Queue ADT can’t do?

Union(Q1, Q2)

3
New cards

What data structure does ordinary priority Queue use?

Data type: Min-heap

4
New cards

Give min heap complecity for insert, min, extract min, union

  • O(logn)

  • O(1)

  • O(logn)

    • N/A


5
New cards

Data structure of mergeable priority Queues

Min binomial heap

6
New cards

Min binomial heap runtime for insert, min, extract min, union

  • O(logn)

  • O(logn)

  • O(logn)

    • O(logn)


7
New cards

Binomial trees vs Binomial Forest

  • k is number of nodes to create 1 tree

    • k is n is number of total nodes for collection of distinct tress


8
New cards

How to create Bkth binary tree?

Take all the tress from {bk-1, …b1, b0} trees, attach a root node on top of them

9
New cards

Number of nodes per each depth of binomial tree

Binomial Coefficent (k choose choose depth)

10
New cards

Binary tree (Bk) properties

knowt flashcard image
11
New cards

Binomial Forest Fn (size n)

Sequence of Bk trees with strictly decreasing k’ s and a total of n node

12
New cards

Binary Forest Properties

  • n nodes

  • n = <bt, bt-1, .. , b0> number of bits

    • has a(n) tress [# where bit is 1]

  • edges = n - a(n)


13
New cards

Min Binomial Heap (size n)

  • Each node in Fn stores one element

  • Each bk in forest is min heap ordered (Min-Heap property)


14
New cards

Min-Heap property

  • Parent is smaller than or equal to priority of children

    • Only valid for the whole path; not necessarily subtrees


15
New cards

Binomial Tree facts

  • 1 key comparison for 1 binomial heap edge

  • Binomial Heap for n elements can be built in O(n) key-comparisons; going in order of S


16
New cards
<p>Explain these arrows. Why is it this way?</p>

Explain these arrows. Why is it this way?

Green - left child pointer

Blue - right child pointer

red - parent pointer

Want atmost 3 pointers per node.

17
New cards
<p>Where is head?</p>

Where is head?

the root of B0

18
New cards

keys vs edges

Keys are stored valued in nodes

edges are connecting 2 nodes together in bk

19
New cards

Lemma 1 of binary tress

Can merge two min heap-ordered Bk trees into a single min heap-ordered Bk+1 tree with just one key comparison

20
New cards

Lemma 2 of binary trees

Deleting the root of a min heap-ordered Bk tree gives a min binomial heap

21
New cards
<p>Explain what is going on in picture</p>

Explain what is going on in picture

When you add 2 binary heaps, you add each b0, b1, .., bk trees. The top shows carry and bottom is the new b0,…bk trees (which uses lemma 1 to combine root)

22
New cards

WC complexity of union(P,Q)

If each tree has atmost <= n nodes.
By fact and lemma 1 → we have atmost O(logn) trees each for p and q

Thus O(logn) key comparisons.