arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1806.10498cs.DS
收藏

具有几乎最优访问代价的动态树

Dynamic Trees with Almost-Optimal Access Cost

Mordecai Golin, John Iacono, Stefan Langerman, J. Ian Munro, Yakov Nekrich

摘要:

元素访问序列的最优二叉搜索树是一棵静态树,它使总搜索成本最小化。构造完美的最优二叉搜索树是昂贵的,所以最有效的算法构造几乎最优的搜索树。存在动态地构造几乎最优搜索树的长文献,即,当事先不知道访问模式时。所有这些树,例如,展开树和树提供了最优搜索成本的乘法近似。在本文中,我们将展示如何保持一个几乎最优的加权二叉搜索树下的访问操作和插入的新元素的近似是一个加法常数。从技术上讲,我们维护一个树,其中包含元素$e_i$的叶子的深度不超过$\min(\log(W/w_i),\log n)+O(1)$,其中$w_i$是访问$e_i$的次数,$W$是访问序列的总长度。我们的技术还可以用于在$O(m)$时间中用动态字母码对$m$符号序列进行编码,使得编码长度由$m(H+O(1))$限定,其中$H$是序列的熵。这是第一个有效的算法,自适应字母编码,运行在每个符号的恒定时间。

英文摘要:

An optimal binary search tree for an access sequence on elements is a static tree that minimizes the total search cost. Constructing perfectly optimal binary search trees is expensive so the most efficient algorithms construct almost optimal search trees. There exists a long literature of constructing almost optimal search trees dynamically, i.e., when the access pattern is not known in advance. All of these trees, e.g., splay trees and treaps, provide a multiplicative approximation to the optimal search cost. In this paper we show how to maintain an almost optimal weighted binary search tree under access operations and insertions of new elements where the approximation is an additive constant. More technically, we maintain a tree in which the depth of the leaf holding an element $e_i$ does not exceed $\min(\log(W/w_i),\log n)+O(1)$ where $w_i$ is the number of times $e_i$ was accessed and $W$ is the total length of the access sequence. Our techniques can also be used to encode a sequence of $m$ symbols with a dynamic alphabetic code in $O(m)$ time so that the encoding length is bounded by $m(H+O(1))$, where $H$ is the entropy of the sequence. This is the first efficient algorithm for adaptive alphabetic coding that runs in constant time per symbol.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑