Assuming Zipf's Law to be accurate, we show that existing techniques for partially optimizing binary trees produce results that are approximately 10% worse than true optimal. We present a new approximate optimization technique that runs in O(n log n) time and produces trees approximately 1% worse than optimal. The running time is comparable to that of the Garsia-Wachs algorithm but the technique can be applied to the more useful case where the node being searched for is expected to be contained in the tree as opposed to outside of it.
翻译:假设齐普夫法的准确性,我们发现,部分优化二进制树木的现有技术产生的结果比真正的最佳效果差大约10%。我们展示了一种新的近似优化技术,在O(nlognn)时间运行,生产树木比最佳效果差大约1%。运行时间与Garsia-Wachs算法的算法相当,但该技术可以应用到一个更有用的案例,即正在搜索的节点预计将包含在树上而不是树外。