# Amortized Analysis of extract-min-operation of Fibonacci Heap

I am studying the operations of the Fibonacci heap. While going through min-extraction operation every step and its complexities are fairly clear to me. In short, it is:

The potential before extracting the minimum node is t(H) + 2m(H), and the potential afterward is at most (D(n) + 1) + 2m(H), since at most D(n) + 1 roots remain and no nodes become marked during the operation. The amortized cost is thus at most

O(D(n) + t(H)) + ((D(n) + 1) + 2m(H)) - (t(H) + 2m(H))

= O(D(n)) + O(t(H)) - t(H)

= O(D(n))

I don't understand this particular line: "since at most D(n) + 1 roots remain" after consolidation. How do we derive this result? Can not it happen that all of the t(H)+D(n)-1 root nodes have different degrees so all of them remain?

• Please credit the original source of all copied material. Please transcribe images to text; you can use Mathjax to help with that.
– D.W.
Sep 6, 2021 at 5:08

As D(n) denotes the max degree of any node, the highest degree of any child of the deleted node can be D(n)-1, and there can be at most D(n) children of the deleted node. Now after merging all the children of the deleted node to the root list, the highest degree of any node is D(n)-1.

Now the question is, how many roots of degree D(n)-1 are there in the root list?

The fewer number of roots having a certain degree, the fewer number of linking will occur, resulting in a heap having a larger number of roots.

So there are at least D(n) roots of degree D(n)-1 in the root list (only the children of the deleted node).

To have the maximum number of roots in the resulting heap, the original heap should have all roots of distinct degrees. Moreover, the original heap shouldn't have a root with degree D(n)-1 (otherwise an additional linking will occur).

Now the CONSOLIDATE function will start linking the D(n) roots, each having degree D(n)-1. This will result in at most floor(log(D(n)))+1 roots.

So the maximum number of roots after consolidation should be:

D(n)-2+floor(log(D(n)))+1
= D(n)+floor(log(D(n)))-1


Though I ain't sure how this is related to D(n)+1.

Pigeonhole principle: if there were more than $$D(n) + 1$$ roots, some roots would have the same degree and should have been merged.
{"ft_lang_label":"__label__en","ft_lang_prob":0.9036713,"math_prob":0.9876743,"size":815,"snap":"2022-40-2023-06","text_gpt3_token_len":235,"char_repetition_ratio":0.12330456,"word_repetition_ratio":0.029850746,"special_character_ratio":0.30306748,"punctuation_ratio":0.09714286,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9977314,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-10-02T15:11:03Z\",\"WARC-Record-ID\":\"<urn:uuid:9d74d4b8-16f7-4398-b728-ae937a7de880>\",\"Content-Length\":\"230649\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:bd195b8b-adff-498e-85d5-a429e0eb7f9a>\",\"WARC-Concurrent-To\":\"<urn:uuid:a4fb0775-21fb-431a-9fc5-e26bb7cd53f4>\",\"WARC-IP-Address\":\"151.101.1.69\",\"WARC-Target-URI\":\"https://cs.stackexchange.com/questions/143712/amortized-analysis-of-extract-min-operation-of-fibonacci-heap\",\"WARC-Payload-Digest\":\"sha1:KWA7JL4CX7B7BUUWTK77THQEH54FDBQZ\",\"WARC-Block-Digest\":\"sha1:NFI7TBP4VTEEQNOR2LSFGDTIZZWONBXC\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-40/CC-MAIN-2022-40_segments_1664030337338.11_warc_CC-MAIN-20221002150039-20221002180039-00729.warc.gz\"}"}