Potential Method For Fibonacci Heap

We define a potential function for a Fibonacci heap as:

Where:

  • : Number of trees in the root list of
  • : Number of marked nodes in

This potential function captures deferred work:

  • Each tree in the root list may need to be consolidated (hence cost).
  • Each marked node may trigger a cascading cut (costly), so it’s weighted more heavily (×2).

Example: For a Fibonacci heap with 5 trees and 3 marked nodes:

Amortised Cost Of insert

Let’s analyse the insert() operation using the potential method. Recall the general formula:

Where:

  • : Actual cost of operation (clearly for insert). for insert())
  • : Potential after the -th insert
  • : Potential before the -th insert

Inserting an element into increases the number of trees in the root list by 1 but does not change the number of marked nodes:

So, the change in potential is:

Hence, the amortised cost per insert operation is:

This gives an amortised cost of for each insert. Additionally, since , it can be shown that the sum of amortized costs is and provides an upper bound on the true cost of any sequence of inserts.

Amortised Cost Of extract-min

For extract-min, the true cost is bounded by:

This is because extracting the minimum root involves:

  • Removing that node,
  • Promoting its children to the root list, and
  • Consolidating the heap to ensure there is at most one tree of any given degree.

Before extraction, the potential is

After extraction and consolidation:

  • The number of trees is at most because consolidation merges trees of equal degree,
  • No new nodes become marked during this operation;
  • The extracted node might have been marked, so .

The potential after is thus:

The change in potential is therefore

Substituting into the amortised cost formula results in:

Since the maximum degree grows asymptotically as , where is the number of elements in the heap, the amortised cost of extract-min is therefore

Amortised Cost Of decrease-key

For decrease-key, suppose the operation on the heap state results in nodes being promoted to the root level through cascading cuts. The true cost is

because each cascading cut to promote a node to the root takes constant time .

Before the operation, the potential is

After decreasing the key and promoting nodes, the potential satisfies

This inequality holds because:

  • At least and at most previously marked nodes are promoted to the root and thus become unmarked, reducing the marked count,
  • The final cascading cut might mark its previously unmarked parent, increasing the marked count by 1.

Therefore, the change in potential is

Substituting into the amortised cost formula yields

Thus, the amortised cost of decrease-key is .

Intuition Behind The Chosen Potential

To understand the intuition behind the chosen potential function for Fibonacci heaps, recall that all operations can affect:

  • the number of trees in the root list, and
  • the number of marked nodes in the heap (particularly during decrease-key).

It is therefore natural to define a potential function based on these two quantities. The standard potential used is:

However, this still leaves the question: why exactly the constants 1 and 2?

To explore this, assume a generalised potential function:

Let’s revisit the amortised analysis of decrease-key using this form.

Before the operation:

After decreasing the key and promoting nodes:

  • The number of trees increases by ,
  • The number of marked nodes decreases by at least , but can increase by 1 due to the final cascading cut.

So the potential becomes:

Now compute the amortised cost:

This result is not useful as an amortised bound, because the right-hand side still depends on , which varies per operation.

To eliminate this dependency, we want the coefficient of to vanish:

Solving this gives the natural choice:

So, defining the potential as

makes the amortised cost of decrease-key independent of , yielding a clean bound.