encyclopegia.org

Binomial heap

In computer science, a binomial heap is a data structure that acts as a priority queue.[src] It is an example of a mergeable heap (also called meldable heap), as it supports merging two heaps in logarithmic time.[src] It is implemented as a heap similar to a binary heap but using a special tree structure that is different from the complete binary trees used by binary heaps.[src] Binomial heaps were invented in 1978 by Jean Vuillemin.[src]

In computer science, a binomial heap is a data structure that acts as a priority queue.[src] It is an example of a mergeable heap (also called meldable heap), as it supports merging two heaps in logarithmic time.[src] It is implemented as a heap similar to a binary heap but using a special tree structure that is different from the complete binary trees used by binary heaps.[src] Binomial heaps were invented in 1978 by Jean Vuillemin.[src] The number of different ways that n items with distinct keys can be arranged into a binomial heap equals the largest odd divisor of n![src] .[src] For n=1,2,3,\dots these numbers are 1, 1, 3, 3, 15, 45, 315, 315, 2835, 14175, ...[src] If the n items are inserted into a binomial heap in a uniformly random order, each of these arrangements is equally likely.[src] if p.root.key j , this tree is moved to the output heap.[src] When both of the two heaps contain a tree of order j , the two trees are merged to one tree of order j+1 so that the minimum-heap property is satisfied.[src] It may later become necessary to merge this tree with some other tree of order j+1 in one of the two input heaps.[src] In the course of the algorithm, it will examine at most three trees of any order, two from the two heaps we merge and one composed of two smaller trees.[src] function merge(p, q) while not (p.end() and q.end()) tree = mergeTree(p.currentTree(), q.currentTree()) if not heap.currentTree().empty() tree = mergeTree(tree, heap.currentTree()) heap.addTree(tree) heap.next(); p.next(); q.next() Because each binomial tree in a binomial heap corresponds to a bit in the binary representation of its size, there is an analogy between the merging of two heaps and the binary addition of the sizes of the two heaps, from right-to-left.[src] Whenever a carry occurs during addition, this corresponds to a merging of two binomial trees during the merge.[src] Each binomial tree's traversal during merge only involves roots, hence making the time taken at most order \log_2 n and therefore the running time is O(\log n) .[src] min = heap.trees().first() for each current in heap.trees() if current.root < min.root then min = current for each tree in min.subTrees() tmp.addTree(tree) heap.removeTree(min) merge(heap, tmp) ==Summary of running times==[src]

20 sentences · 20 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Binomial heap." encyclopegia.org, 2024, https://encyclopegia.org/wiki/binomial-heap. Accessed 27 November 2026.

Chicago

"Binomial heap." encyclopegia.org. Accessed November 27, 2026. https://encyclopegia.org/wiki/binomial-heap.

APA

encyclopegia.org. (2024). Binomial heap. Retrieved November 27, 2026, from https://encyclopegia.org/wiki/binomial-heap

Accessed November 27, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

binomial series

stub · references available

list of Septimus Heap characters

stub · references available

binomial proportion confidence interval

stub · references available

2–3 heap

stub · references available

A Treatise on the Binomial Theorem

stub · references available

adaptive heap sort

stub · references available

Binomial QMF

stub · references available

binomial type

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1221086681 · 0.5 · snapshot enwiki-001221086681

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.