The Fibonacci heap is a priority queue data structure in which finding and removing the top-priority item takes logarithmic time (like a binary heap) but reprioritizing items to have higher priority takes only constant time, under amortized time analysis. This property is useful for speeding up the time complexity of algorithms including Dijkstra’s algorithm for shortest paths and Jarník’s algorithm for minimum spanning trees, so that they take logarithmic time per vertex and constant time per edge.
The Fibonacci heap is a priority queue data structure in which finding and removing the top-priority item takes logarithmic time (like a binary heap) but reprioritizing items to have higher priority takes only constant time, under amortized time analysis. This property is useful for speeding up the time complexity of algorithms including Dijkstra’s algorithm for shortest paths and Jarník’s algorithm for minimum spanning trees, so that they take logarithmic time per vertex and constant time per edge.
In its internal structure, the Fibonacci heap is a forest of trees, with one tree node per prioritized object, higher priorities towards to roots of the trees. The analysis of its logarithmic-time find-and-remove operation can be split into two parts: showing that the time of this operation is proportional to the maximum number of children of any node in this tree (the degree of the node), and showing that the degree is logarithmic. It is the second part of this analysis that gives the data structure its name: a node with degree \(d\) must be the root of a subtree at least a Fibonacci number of nodes, \(F_{d+2}\) (numbering the Fibonacci numbers starting from \(F_0=0\) and \(F_1=1\)). For instance, a subtree whose root has three children must contain at least five nodes, etc. Therefore, in a Fibonacci heap that reaches a maximum size of \(n\),
the degree is bounded by the requirement that \(F_{d+2}\le n\), for otherwise we would have a tree with more elements than the entire heap. But this standard analysis, which you can find in the original Fibonacci heap paper, Wikipedia, or the textbook Introduction to Algorithms, is not tight! It turns out that the actual requirement is \(F_{d+3}\le n\). Or in other words, the degrees of the trees in a Fibonacci heap are smaller by one than the bound given by the standard analysis.
To prove that each subtree has a Fibonacci number of nodes, one uses a lemma that the \(i\)th child of any node (in the order that it was added as a child) must itself have degree at least \(i-2\). This follows from the three ways that the Fibonacci heap data structure can change its forest. First, a deletion operation can remove the root of its tree, making its children into roots, but their degrees remain unchanged. Second, any deletion triggers a cleanup phase in which pairs of trees with equal numbers of children are merged by making one root into the child of another. If this merge adds a node as the \(i\)th child of the merged root, the new child had the same degree as the root before the merge, \(i-1\). And third, a change of priority can trigger the removal of some tree edges (promoting the child of a node to become a new tree root), but every node that is not a tree root can have only one child removed while it is not a root. Thus, the \(i\)th child of a node, which was at least the \(i\)th child and had degree at least \(i-1\) when it first became a child, can only have its degree decrease by one, to \(i-2\).
Based on this lemma, one can construct a sequence of the smallest trees \(T_d\) with each root degree \(d\). In this sequence, each tree \(T_d\) is formed from \(T_{d-1}\) by adding to it another child with \(d-2\) grandchildren (the minimum allowed by the lemma). The added child’s subtree takes the form of \(T_{d-2}\), the smallest subtree that could give that number of grandchildren. Thus, \(T_d=T_{d-1}+T_{d-2}\) for an addition operation on trees that adds the second tree argument of the operation as a child of the first tree argument. This is the Fibonacci recurrence, and these trees have a Fibonacci number of nodes.

But now, instead of looking at the minimum size of a tree with degree \(d\), let’s consider what situation has to occur for a tree with degree \(d\) to be created. As a base case, a tree with degree one is created by merging two trees of degree zero. For this merge to happen, the Fibonacci heap needs to perform a deletion operation (to trigger the merge) in a state where there are already two trees of degree zero to be merged. Thus, creating a tree with degree one requires there to exist three heap elements, before the deletion operation: one to be deleted and two more in the merged trees. Similarly, to create a tree with degree two, we need to merge two trees of degree one (with at least two nodes each), triggered by a deletion of another element. So this creation requires five elements: four in the two merged trees and one to be deleted to trigger a merge or sequence of merges that ends up merging two degree-one trees.
More generally, we can prove by induction that creating a tree of degree \(d\) can only happen after the heap has reached a size of \(F_{d+3}\). To create a tree of degree \(d\), we need the first of two trees of degree \(d-1\) to be created (in the same merge step or in an earlier merge step as the one creating the tree of degree \(d\)), and then the second, and then a merge of the two. When the first tree is created, it contains at least \(F_{d+1}\) elements that cannot participate in the creation of the second tree, by the tree size bound from the old analysis of Fibonacci heaps. When the second tree is created, the trees that merge to form it and the deleted element that trigger the merge comprise at least \(F_{d+2}\) elements, by the induction hypothesis. Together these give \(F_{d+1}+F_{d+2}=F_{d+3}\) elements in the heap, just before the deletion that triggered the creation of the second merged subtree and then the merge of the two degree-\((d-1)\) trees into a single degree-\(d\) tree.
This induction proof also guides a construction of a sequence of operations that creates a degree-\(d\) tree, and then trims it down to the form \(T_{d-1}\), while keeping the maximum number of elements in the heap at most \(F_{d+3}\). As a base case, inserting three elements into an empty heap and deleting one will create a degree-one tree \(T_1\), with no trimming needed. Then for any degree \(d>1\), create a degree-\((d-1)\) tree and trim it to the form \(T_{d-1}\) recursively. Then, create a second degree-\((d-1)\) tree. The merge step that creates it will also merge it with the first \(T_{d-1}\); assign priorities in such a way that the second tree becomes a child of the first \(T_{d-1}\). Continue performing improve-priority and delete operations that trim the second tree to the form \(T_{d-1}\), while it remains a subtree of the first tree, producing a tree formed by merging two copies of \(T_{d-1}\). Then, use additional improve-priority and delete operations to remove the last child of the last child of the root, producing a tree in the form of \(T_d\). The number of elements in the heap rises to \(F_{d+2}\) while creating the first \(T_{d-1}\), falls back down to \(F_{d+1}\), and then rises to \(F_{d+1}+F_{d+2}=F_{d+3}\) while finishing the construction, matching the lower bound.
(Discuss on Mastodon)
By David Eppstein