Computer science Binomial Heap and Binary Heap.
http://www.redicals.com
Size: 356.84 KB
Language: en
Added: Nov 19, 2014
Slides: 10 pages
Slide Content
BINOMIAL HEAPS
Definition A binomial tree B k is an ordered tree defined recursively. B consists of a single node. For k≥1, B k is a pair of B k −1 trees, where the root of one B k −1 becomes the leftmost child of the other.
BINOMIAL HEAPS
Properties of Binomial Trees
The Binomial Heap A binomial heap is a collection of binomial trees that satisfies the following binomial-heap properties: No two binomial trees in the collection have the same size. Each node in each tree has a key. Each binomial tree in the collection is heap-ordered in the sense that each non-root has a key strictly less than the key of its parent.
Implementation of a Binomial Heap Keep at each node the following pieces of information: a field key for its key, a field degree for the number of children, a pointer child , which points to the leftmost-child, a pointer sibling , which points to the right-sibling, and a pointer p , which points to the parent.
Operations on Binomial Heaps creation of a new heap , search for the minimum key, uniting two binomial heaps , insertion of a node , removal of the root of a tree , decreasing a key, and removal of a node.