dc.contributor.author Hofri, MichaShachnai, Hadas 2017-08-02T22:03:30Z 2017-08-02T22:03:30Z 1996-11-13 https://hdl.handle.net/1911/96459 We consider the problem of maintaining a binary search tree that minimizes the average access cost needed to satisfy randomly generated requests. We analyze scenarios in which the accesses are generated according to a vector of fixed probabilities which is unknown. Our approach is statistical. We devise policies for modifying the tree structure dynamically, using rotations of accessed elements towards the root. The aim is to produce good approximations of the optimal structure of the tree, while keeping the number of rotations as low as possible. The heuristics we propose achieve a close approximation to the optimal BST, with lower organization costs than any previously studied. First the {\em Move Once} (MO) rule is introduced. The average access cost to the tree under this rule is shown to equal the value achieved by the common rule Move to the Root (MTR). The advantage of MO over MTR and other rules is that it relocates each of the items in the tree at most once. We show that the total cost of modifying the tree by the MO rule is O(n lg n) rotations (in a tree with n items). This holds for a sequence of accesses of arbitrary length, independently of the access probabilities. Then the MO rule is combined with the use of reference counters, one per item, that provide estimates of the reference probabilities. We define the rule MOUCS, and show, that for any delta and alpha > 0,it achieves a cost that approaches the optimum up to a difference of $\delta$with probability higher than 1alpha, within a number of accesses that is proportional to $n/(\alpha \delta^2)$.\\ 16 pp eng You are granted permission for the noncommercial reproduction, distribution, display, and performance of this technical report in any format, but this permission is only for a period of forty-five (45) days from the most recent time that you verified that this technical report is still available from the Computer Science Department of Rice University under terms that include this permission. All other rights are reserved by the author(s). Efficient Reorganization of Binary Search Trees Technical report November 13, 1996 TR96-267 Text Hofri, Micha and Shachnai, Hadas. "Efficient Reorganization of Binary Search Trees." (1996) https://hdl.handle.net/1911/96459.
﻿