The Unbounded k-Balanced Binary Tree
k-balanced binary trees are a form of binary tree balanced by the internal path reduction algorithm described by Gonnet in his original article . As discussed previously in Chapter 3, this balancing scheme reorganizes one or more subtrees whenever the internal path length can be reduced. The idea is that future search operations will examine fewer subtrees during a search since the subtrees are closer to the root of the tree after being rebalanced. In Gonnet’s original exposition of the algorithm, rebalancing occurred whenever the internal path length could be reduced by one, and leading to the term 1 -balanced tree. As noted by Gonnet, a factor of two, three, or greater could also be used with essentially the same algorithm, which would rebalance a subtree when its internal path length could be reduced by the given factor. He gave the name k-balanced trees to the class of binary search trees balanced in this manner. In this chapter, we present an implementation for k- balanced trees where k is termed the balancing control factor regulating the frequency of rebalancing operations.
KeywordsBinary Tree Tree Object Tree Operation Exception Handler Balance Tree
Unable to display preview. Download preview PDF.
- G.H. Gönnet, Handbook of Algorithms and Data Structures, Addison-Wesley, Reading, MA 1984.Google Scholar