Definition
The bound is based on a fixed ''perfect BST'' , called the lower bound tree, over the keys . For example, for , can be represented by the following parenthesis structure: :: [12 [3">[1.html" ;"title="[1">[12 [3 4 ([5">[1.html"_;"title="[1">[1<_a>2_[3.html" ;"title="[1.html" ;"title="[1">[12 [3">[1.html" ;"title="[1">[12 [3 4 ([56 [7])] For each node in , define: * to be the set of nodes in the left sub-tree of , including . * to be the set of nodes in the right sub-tree of . Consider the following access sequence: . For a fixed node , and for each access , define the label of with respect to as: * "''L''" - if is in . * "''R''" - if is in ; * Null - otherwise. The label of is the concatenation of the labels from all the accesses. For example, if the sequence of accesses is: then the label of the root is: "RRL", the label of 6 is: "RL", and the label of 2 is: "L". For every node , define the ''amount of interleaving through y'' as the number of alternations between L and R in the label of . In the above example, the interleaving through and is and the interleaving through all other nodes is . The ''interleave bound'', , is the sum of the interleaving through all the nodes of the tree. The interleave bound of the above sequence is .The Lower Bound Statement and its Proof
The ''interleave bound'' is summarized by the following theorem. The following proof is based on.Proof
Let be an access sequence. Denote by the state of an arbitrary BST at time i.e. after executing the sequence . We also fix a lower bound BST . For a node in , define the ''transition point'' for at time to be the minimum-depth node in the BST such that the path from the root of to includes both a node from ''Left''(''y'') and a node from ''Right''(''y''). Intuitively, any BST algorithm on that accesses an element from ''Right''(''y'') and then an element from ''Left''(''y'') (or vice versa) must touch the transition point of at least once. In the following Lemma, we will show that transition point is well-defined. The second lemma that we need to prove states that the transition point is stable. It will not change until it is touched. The last Lemma toward the proof states that every node has its unique transition point. Now, we are ready to prove the theorem. First of all, observe that the number of touched transition points by the offline BST algorithm is a lower bound on its cost, we are counting less nodes than the required for the total cost. We know by Lemma 3 that at any time , any node in can be only a transition for at most one node in . Thus, It is enough to count the number of touches of a transition node of , the sum over all . Therefore, for a fixed node , let and to be defined as in Lemma 1. The transition point of is among these two nodes. In fact, it is the deeper one. Let be a maximal ordered access sequence to nodes that alternate between and . Then is the amount of interleaving through the node . Suppose that the even indexed accesses are in the , and the odd ones are in i.e. and . We know by the properties of lowest common ancestor that an access to a node in , it must touch . Similarly, an access to a node in must touch . Consider every . For two consecutive accesses and , if they avoid touching the access point of , then and must change in between. However, by Lemma 2, such change requires touching the transition point. Consequently, the BST access algorithm touches the transition point of at least once in the interval of . Summing over all , the best algorithm touches the transition point of at least . Summing over all , where is the amount of interleave through . By definition, the 's add up to . That concludes the proof.See also
* Tango tree * Optimal binary search tree *References
{{reflist Binary trees