Binomial-Link (y, z)
The above Procedure links Bk – 1 tree rooted at ‘y’ and Bk tree rooted at ‘z’. It makes ‘z’ the parent of ‘y’. By this Procedure node ‘z’ becomes the root of a Bk tree.
Step 1 Initialization, making parent.
set Parent [y] z
Step 2 Making sibling of y to the left-child of z.
set sib [y] Lchild [z]
Step 3 Making ‘y’ the left child to ‘z’
set Lchild [z] y
Step 4 Increment the degree by 1
set deg [z] deg [z] + 1
No comments:
Post a Comment