In the DECREASE-KEY
operation of Fibonacci Heap, whenever a node is cut from its parent and added to the root list, its mark attribute is set to FALSE
. However, in the EXTRACT-MIN
operation, the children of the min-node are added to the root list but their mark attributes aren't set to FALSE
. Why is there such inconsistency?
Moreover, in the linking operation where a node is made the child of another node, the mark attribute of the new child is set to FALSE
. The EXTRACT-MIN
operation performs this linking operation multiple times. But in the amortized analysis of EXTRACT-MIN
operation described in the CLRS book, the authors claim that the number of marked nodes doesn't change in EXTRACT-MIN
operation. They use m(H)
to denote the number of marked nodes both before and after EXTRACT-MIN
operation. I am quoting the exact line from the book:
The potential before extracting the minimum node is t(H)+2m(H), and the potential afterward is at most (D(n)+1)+2m(H).
Here D(n)
is the maximum degree of any node in an n-node Fibonacci Heap, t(H)
is the number of trees in the Fibonacci Heap and m(H)
is the number of marked nodes in the Fibonacci Heap.
Isn't this calculation wrong?