jscoot
jscoot

Reputation: 2109

CLRS's Fibonacci Heap size(x) analysis has a flaw?

In CLRS's Introduction to Algorithms 3rd edition P.525, when it analyzes the size(x)'s lower bound, there is a sentence that I quote as "because adding children to a node cannot decrease the node’s size, the value of Sk increases monotonically with k". But in fact, i think i can give a counterexample to show that Sk does not necessarily increase monotonically with k. In the following graph, the degree of the node with key=1 is 2, and there is no other node with degree of 2. So S2=8. Similarly, S3=6. But now S3 is less than S2 which means Sk is not montonically increasing with k at all.

2 - 0 - 4 - 2 - 5 - 8 - 7 -  1
            |               /  \
            8              2    9
                              / | \
                             10 14 16
                             |  |
                             11 15

The heap can be derived from an unorder binomial subtree by executing a series of cuts and cascading-cuts.

I want to know whether the above structure is a valid fibonacci heap. If so, then it is also a valid counterexample.

Upvotes: 1

Views: 393

Answers (1)

quaint
quaint

Reputation: 131

Sk is defined to be the greatest lower bound such that every degree-k subtree in every possible Fibonacci heap has at least Sk descendants.

Upvotes: 2

Related Questions