1
play

1 Fib- -Heap Heap- -Extract Extract- -Min Min Example: Fib- - PDF document

Fibonacci Heaps Example: Fibonacci Heap Fibonacci Heaps Example: Fibonacci Heap Unordered Binomial trees Unordered Binomial trees Properties of UnorderedBinomial Properties of UnorderedBinomial Trees Trees Lemma. For the unorder


  1. Fibonacci Heaps Example: Fibonacci Heap Fibonacci Heaps Example: Fibonacci Heap Unordered Binomial trees Unordered Binomial trees Properties of UnorderedBinomial Properties of UnorderedBinomial Trees Trees Lemma’. For the unorder binomial tree U k Def. For each non-negative integer k, a 1. The number of nodes of is 2 k U binomial tree U k of root degree k is an k ordered tree defined recursively as follow: 2. Height( ) = U k k   k 3. U has exactly nodes at level , for i   k = …   i i 0,1, , k 1) U 0 consists of a single node 4. The root degree of is greater than U 2) U k consists of two binomial trees U k-1 k the degree of every other node in . U linked together such that the root of one is k The children of the root are roots of the left child of the root of the other. … subtrees in some order U U , , , U − 0 1 k 1 Fib Fib- -Heap Heap- -Insert Insert Fib- Fib -Heap Heap- -Union Union 1

  2. Fib- -Heap Heap- -Extract Extract- -Min Min Example: Fib- -Heap Heap- -Extract Extract- -Min Min Fib Example: Fib Example: Fib- Example: Fib -Heap Heap- -Extract Extract- -Min (Cont.) Min (Cont.) Consolidate & Fib Consolidate & Fib- -Heap Heap- -Link Link { { { Fib- Fib -Heap Heap- -Decrease Decrease- -Key & Cut Key & Cut Cascading- Cascading -Cut Cut 2

  3. Example: Fib- -Heap Heap- -Decrease Decrease- -Key Key Fib- -Heap Heap- -Delete Delete Example: Fib Fib 3

Recommend


More recommend