1
play

1 Binomial Heaps Binomial- -Heap Heap- -Union Union Binomial - PDF document

Binomial Heaps Binomial trees Binomial Heaps Binomial trees Def. For each non-negative integer k, a binomial tree B k of root degree k is an ordered tree defined recursively as follow: 1) B 0 consists of a single node 2) B k consists of two


  1. Binomial Heaps Binomial trees Binomial Heaps Binomial trees Def. For each non-negative integer k, a binomial tree B k of root degree k is an ordered tree defined recursively as follow: 1) B 0 consists of a single node 2) B k consists of two binomial trees B k-1 linked together such that the root of one is the left child of the root of the other. Binomial Trees Binomial Trees Properties of Binomial Trees Properties of Binomial Trees Lemma. For the binomial tree B k 1. The number of nodes of is 2 k B k 2. Height( ) = B k k   k 3. B has exactly nodes at level , for i   k = …   i i 0,1, , k 4. The root degree of is greater than the B k degree of every other node in . B k If the children of the root are numbered k − from right to left by then … 0,1, , 1 child is the root of subtree i B i A Binomial Heap A Binomial Heap Binomial tree B Binomial tree B 4 4 with nodes labeled with nodes labeled in binary by a postorder in binary by a postorder walk walk 1

  2. Binomial Heaps Binomial- -Heap Heap- -Union Union Binomial Heaps Binomial Binomial- Binomial -Heap Heap- -Union Union Binomial Binomial- -Heap Heap- -Union (cont.) Union (cont.) Binomial Heaps Binomial Heaps Binomial Binomial- -Heap Heap- -Union Union 2

  3. Binomial Binomial- -Heap Heap- -Extract Extract- -Min Min Binomial Heaps Binomial Heaps Binomial- Binomial -Heap Heap- -Decrease Decrease- -Key Key 3

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend