Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
20 views3 pages

Fibonacci Heap - Insertionand Mergeable Heap Operations

Uploaded by

097Shashank Sahu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views3 pages

Fibonacci Heap - Insertionand Mergeable Heap Operations

Uploaded by

097Shashank Sahu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

KIET Group of Institutions, Ghaziabad

Department of Computer Applications


(An ISO – 9001: 2015 Certified & ‘A’ Grade accredited Institution by NAAC)
Design and Analysis of Algorithm
KCS 503: Session 2020-21
Unit-2 Lecture-26 Topic: Fibonacci Heap
Video Link

Definition:

The Fibonacci heap is a collection of trees with min-heap or max-heap properties. The Trees in Fibonacci
heap can be of any order.

h(min)

Figure: Representation of Fibonacci heap

All the tree nodes are connected using a doubly linked list so that they can be accessed using ‘min’
pointer.

Note: The reduced time complexity of Decrease-Key has importance in Dijkstra and Prim algorithms.
With Binary Heap, time complexity of these algorithms is O(VLogV + ELogV). If Fibonacci Heap is used,
then time complexity is improved to O(VLogV + E).
KIET Group of Institutions, Ghaziabad
Department of Computer Applications
(An ISO – 9001: 2015 Certified & ‘A’ Grade accredited Institution by NAAC)
Design and Analysis of Algorithm
KCS 503: Session 2020-21
Fibonacci heap are mainly called so because Fibonacci numbers are used in the running time analysis.
Also, every node in Fibonacci Heap has degree at most O(log n) and the size of a subtree rooted in a
node of degree k is at least Fk+2, where Fk is the kth Fibonacci number.

Algorithm for Insertion of node in fibonacci heap:

Step 1: Create a new node X

Step2: Check if the heap is empty

Step 3: if heap is empty

 Make x as the only node in heap


 Set h(min) pointer to x

Step4: else

 Insert X into root list and update h(min)

Algorithm for Union Of Two Fibonacci Heap:

Step 1: Join root lists of Fibonacci heaps H1 and H2 and make a single Fibonacci heap H.

Step 2: If H1(min) < H2(min) then

 H(min) = H1(min).

Step 3: else:

 H(min) = H2(min).
KIET Group of Institutions, Ghaziabad
Department of Computer Applications
(An ISO – 9001: 2015 Certified & ‘A’ Grade accredited Institution by NAAC)
Design and Analysis of Algorithm
KCS 503: Session 2020-21

You might also like