Lably
Skip to content

Binomial heap

Data structure that acts as a priority queue

  • 7 min read
  • 5 chapters

Related on Lably

Through Computer science, Data structure and Binary tree

Binomial heap

A binomial heap is implemented as a set of binomial trees (compare with a binary heap, which has a shape of a single binary tree), which are defined recursively as follows:

  • A binomial tree of order 0 is a single node
  • A binomial tree of order k has a root node whose children are roots of binomial trees of orders k−1, k−2, ..., 2, 1, 0 (in this order).

A binomial tree of order k has 2k nodes, and height k. The name comes from the shape: a binomial tree of order k has (kd) nodes at depth d, a binomial coefficient. Because of its structure, a binomial tree of order k can be constructed from two trees of order k−1 by attaching one of them as the leftmost child of the root of the other tree. This feature is central to the merge operation of a binomial heap, which is its major advantage over other conventional heaps.

Sign in to keep reading

4 more chapters are free with a Lably account.

More in Computing and communication