Modular exponentiation is an expensive operation in TGDH. The number of exponentiations for membership events varies, depending on the tree structure. For example, if a single member or a subtree merges to the root node of the current tree, then exactly two modular exponentiations are required. If a key tree is balanced, and a member joins to a leaf node, then the number of exponentiations is where is the current number of users. Hence, it is easy to see that joining to the root always requires the minimal number of exponentiations for additive membership operations. If members join to the root, however, the resulting tree becomes unbalanced (similar to a linked list). If a member in the deepest node leaves the group, exponentiations are required to update the group key. However, if a key tree is fully balanced, the number of exponentiations is . These examples indicate that a well-balanced key tree reduces the expected cost of leaves. Our heuristic to keep the tree balanced is to choose the insertion node of a join or merge operation as the rightmost shallowest node, which does not increase the height (see also sections 5.2 and 5.5).