Fibonacci heap
Data structure for priority queue operations / From Wikipedia, the free encyclopedia
Dear Wikiwand AI, let's keep it short by simply answering these key questions:
Can you list the top facts and stats about Fibonacci heap?
Summarize this article for a 10 year old
In computer science, a Fibonacci heap is a data structure for priority queue operations, consisting of a collection of heap-ordered trees. It has a better amortized running time than many other priority queue data structures including the binary heap and binomial heap. Michael L. Fredman and Robert E. Tarjan developed Fibonacci heaps in 1984 and published them in a scientific journal in 1987. Fibonacci heaps are named after the Fibonacci numbers, which are used in their running time analysis.
Fibonacci heap | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Type | heap | ||||||||||||||||||||||||||||||||
Invented | 1984 | ||||||||||||||||||||||||||||||||
Invented by | Michael L. Fredman and Robert E. Tarjan | ||||||||||||||||||||||||||||||||
Complexities in big O notation | |||||||||||||||||||||||||||||||||
|
The amortized times of all operations on Fibonacci heaps is constant, except delete-min.[1][2] Deleting an element (most often used in the special case of deleting the minimum element) works in amortized time, where
is the size of the heap.[2] This means that starting from an empty data structure, any sequence of a insert and decrease-key operations and b delete-min operations would take
worst case time, where
is the maximum heap size. In a binary or binomial heap, such a sequence of operations would take
time. A Fibonacci heap is thus better than a binary or binomial heap when
is smaller than
by a non-constant factor. It is also possible to merge two Fibonacci heaps in constant amortized time, improving on the logarithmic merge time of a binomial heap, and improving on binary heaps which cannot handle merges efficiently.
Using Fibonacci heaps improves the asymptotic running time of algorithms which utilize priority queues. For example, Dijkstra's algorithm and Prim's algorithm can be made to run in time.