Abstract
Andersson [1] presented a search algorithm for binary search trees that uses only two-way key comparisons by deferring equality comparisons until the leaves are reached. The use of a different search algorithm means that the optimal tree for the traditional search algorithm, which has been shown to be computable inO(n 2) time by Knuth [3], is not optimal with respect to the different search algorithm. This paper shows that the optimal binary search tree for Andersson's search algorithm can be computed inO(nlogn) time using existing algorithms for the special case of zero successful access frequencies, such as the Hu-Tucker algorithm [2].
Similar content being viewed by others
References
Andersson, A.: A note on searching a binary search tree. Software, Pract. Exper.21(10), 1125–1128 (1991)
Hu, T.C., Tucker, A.C.: Optimal computer search trees and variable length alphabetical codes. SIAM J. Appl. Math.21(4), 514–532 (1971)
Knuth, D.E.: Optimum binary search trees. Acta Inf.1(1), 14–25 (1971)
Knuth, D.E.: The art of computer programming, vol, III: Sorting and searching. Reading, MA: Addison-Wesley 1973
Spuler, D.A.: The best algorithm for searching a binary search tree. Tech Report 92/3, Department Computer Science James Cook University, Townsville, Australia (July 1992)
Spuler, D.A.: The optimal binary search tree for Andersson's search algorithm. Tech Report 92/4, Department Computer Science, James Cook University, Townsville, Australia (July 1992)
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Spuler, D. The optimal binary search tree for Andersson's search algorithm. Acta Informatica 30, 405–407 (1993). https://doi.org/10.1007/BF01210592
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF01210592