For to , Sample Clauses
For to ,. Since every member can order the merging trees independently and unambiguously, all members can agree on a key tree if the merge trees algorithm guarantees uniqueness of the result. We now show how to merge two trees. If two trees are of the same height, we join one tree to the root node (insertion point) of the other. To provide unambiguous ordering we lexicographically compare the identifiers of the respective sponsors. Otherwise, we join the shallower tree to the deeper tree. To locate the insertion point we first try find the rightmost shallowest node (not necessarily a leaf) where the join would not increase the overall tree height. If no such node exists (i.e., the tree height would increase anyway) the insertion point is the root node. As an illustration, consider two trees and , where the height of is greater than that of . The merge trees algorithm is as follows: The first if statement in the while loop breaks when there is no join-able node in ; the trees will then be joined at the root node. Join-able means that we can merge two trees without increasing the height of by placing a subtree rooted at the join-able node as the left child of itself, and putting as the right child. We can see that merge trees algorithm fulfills the goal for the tree management policy described above.
