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 complexity 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, the exact number of steps performed by the algorithms has been calculated. The subject will be introduced by a general discussion on the construction of optimal binary search trees.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Szwarcfiter, J.L. (2003). Optimal Binary Search Trees with Costs Depending on the Access Paths. In: Petreschi, R., Persiano, G., Silvestri, R. (eds) Algorithms and Complexity. CIAC 2003. Lecture Notes in Computer Science, vol 2653. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44849-7_2
Download citation
DOI: https://doi.org/10.1007/3-540-44849-7_2
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-40176-6
Online ISBN: 978-3-540-44849-5
eBook Packages: Springer Book Archive