This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Thus the BINOMIAL HEAP UNION is correct. Problem 19.1 a.MINIMUM min= infinity min_key=nil For every leaf in the tree If key[x]<min min= key[x] min_key=x return min_key b.decrease_key(x,k) key[x]=k if key[x]< small[x] small[x]=key[x] c.insert (x,k) flag=yes for every internal node if it has 2 or 3 leaves new _leaf (x) key[x]=k exit loop else flag= no if flag = no (no empty place for inserting the leaf) merge (H, k) d.delete x decrease_key(x,infinity) if parent (x) has 2 leaves delete leaf x merge(sub tree parent(x),H) else delete leaf x e.extract_min(h) x=minimum(H) delete(x)...
View
Full
Document
This note was uploaded on 11/07/2010 for the course CS 11841 taught by Professor Dr.ayman during the Spring '09 term at Alexandria University.
 Spring '09
 Dr.Ayman
 Algorithms

Click to edit the document details