Optimal search trees using two-way key comparisons
Optimal search trees using two-way key comparisons
复制标题
使用双向键比较的最佳搜索树
DOI:
10.1007/bf01178732
复制
发表时间:
1994
期刊:
影响因子:
0.6
通讯作者:
David A. Spuler
中科院分区:
文献类型:
--
作者:
David A. Spuler
A generalization of binary search trees and binary split trees is developed that takes advantage of two-way key comparisons: the two-way comparison tree. The two-way comparison tree has little use for dynamic situations but is an improvement over the optimal binary search tree and the optimal binary split tree for static data sets. AnO(n) time and space algorithm is presented for constructing an optimal two-way comparison tree when access probabilities are equal, and an exact formula for the optimal cost is developed. The construction of the optimal two-way comparison tree for unequal access frequencies, both successful and unsuccessful, is computable inO(n5) time andO(n3) space using algorithms similar to those for the optimal binary split tree. The optimal two-way comparison tree can improve search cost by up to 50% over the optimal binary search tree.