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
 Spring '09
 Dr.Ayman
 Algorithms, Graph Theory, phloem, Plant morphology, binomial heap, Theory of Algorithms

Click to edit the document details