Skip to main content
Log in

The optimal binary search tree for Andersson's search algorithm

  • Published:
Acta Informatica Aims and scope Submit manuscript

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].

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Andersson, A.: A note on searching a binary search tree. Software, Pract. Exper.21(10), 1125–1128 (1991)

    Google Scholar 

  2. Hu, T.C., Tucker, A.C.: Optimal computer search trees and variable length alphabetical codes. SIAM J. Appl. Math.21(4), 514–532 (1971)

    Google Scholar 

  3. Knuth, D.E.: Optimum binary search trees. Acta Inf.1(1), 14–25 (1971)

    Google Scholar 

  4. Knuth, D.E.: The art of computer programming, vol, III: Sorting and searching. Reading, MA: Addison-Wesley 1973

    Google Scholar 

  5. 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)

    Google Scholar 

  6. 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)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints 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

Download citation

  • Received:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF01210592

Keywords

Navigation