Alphabetic codes and binary search trees are combinatorial structures that abstract search procedures in ordered sets endowed with probability distributions. In this paper, we design new linear-time algorithms to construct alphabetic codes, and we show that the obtained codes are not too far from being optimal. Moreover, we exploit our results on alphabetic codes to provide new bounds on the average cost of optimal binary search trees. Our results improve on the best-known bounds on the average cost of optimal binary search trees present in the literature.
翻译:字母码与二叉搜索树是用于抽象具有概率分布的有序集合中搜索过程的组合结构。本文设计了构建字母码的新线性时间算法,并证明所得编码距离最优性并不遥远。此外,我们利用在字母码上的研究成果,为最优二叉搜索树的平均成本提供了新的界。我们的结果改进了文献中现有关于最优二叉搜索树平均成本的最佳已知界。