Arrow Research search
Back to TCS

TCS 2003

Optimal binary search trees with costs depending on the access paths

Journal Article journal-article Computer Science · Theoretical Computer Science

Abstract

We describe algorithms for constructing optimal binary search trees, in which the access cost of a key depends on the k preceding keys which were reached in the path to it. This problem has applications to searching on secondary memory and robotics. Two kinds of optimal trees are considered, namely optimal worst case trees and weighted average case trees. The time and space complexities of both algorithms are O(n k+2) and O(n k+1), respectively. The algorithms are based on a convenient decomposition and characterizations of sequences of keys which are paths of special kinds in binary search trees. Finally, using generating functions, we present an exact analysis of the number of steps performed by the algorithms.

Authors

Keywords

  • Algorithms
  • Optimal binary search trees
  • Generating functions

Context

Venue
Theoretical Computer Science
Archive span
1975-2026
Indexed papers
16261
Paper id
269538595101401256
v2026.09.13