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

1
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

1

Fibonacci Heaps Fibonacci Heaps Example: Fibonacci Heap Example: Fibonacci Heap Unordered Binomial trees Unordered Binomial trees

Def. For each non-negative integer k, a binomial tree Uk of root degree k is an

  • rdered tree defined recursively as follow:

1) U0 consists of a single node 2) Uk consists of two binomial trees Uk-1 linked together such that the root of one is the left child of the root of the other.

Properties of Properties of UnorderedBinomial UnorderedBinomial Trees Trees

Lemma’. For the unorder binomial tree

  • 1. The number of nodes of is
  • 2. Height( ) =

3. has exactly nodes at level , for

  • 4. The root degree of is greater than

the degree of every other node in . The children of the root are roots of subtrees in some order

k

U 2k

k

U

k

U

k

U

k

U

k

U k

k i      

i 0,1, , i k = …

1 1

, , ,

k

U U U − … Fib Fib-

  • Heap

Heap-

  • Insert

Insert Fib Fib-

  • Heap

Heap-

  • Union

Union

slide-2
SLIDE 2

2

Fib Fib-

  • Heap

Heap-

  • Extract

Extract-

  • Min

Min Example: Fib Example: Fib-

  • Heap

Heap-

  • Extract

Extract-

  • Min

Min

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

slide-3
SLIDE 3

3

Example: Fib Example: Fib-

  • Heap

Heap-

  • Decrease

Decrease-

  • Key

Key Fib Fib-

  • Heap

Heap-

  • Delete

Delete