Binomial Heap - Binomial Tree

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

  • 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, height k.

Because of its unique structure, a binomial tree of order k can be constructed from two trees of order k−1 trivially by attaching one of them as the leftmost child of root of the other one. This feature is central to the merge operation of a binomial heap, which is its major advantage over other conventional heaps.

The name comes from the shape: a binomial tree of order has nodes at depth . (See Binomial coefficient.)

Read more about this topic:  Binomial Heap

Famous quotes containing the word tree:

    The great pines stand at a considerable distance from each other. Each tree grows alone, murmurs alone, thinks alone. They do not intrude upon each other. The Navajos are not much in the habit of giving or of asking help. Their language is not a communicative one, and they never attempt an interchange of personality in speech. Over their forests there is the same inexorable reserve. Each tree has its exalted power to bear.
    Willa Cather (1873–1947)