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

Zip-zip 树:使 Zip 树更平衡、有偏、紧凑或可持久化

Zip-zip Trees: Making Zip Trees More Balanced, Biased, Compact, or Persistent

Ofek Gila, Michael T. Goodrich, Robert E. Tarjan

AI总结:

本文提出 zip-zip 树以克服 zip 树对较小键的偏差,在仅用极少元数据的情况下达到与 treap 相当的期望深度,并支持强历史无关、有偏和部分可持久化等扩展。

摘要:

我们定义了 zip 树的简单变体,称为 zip-zip 树,它相比 zip 树具有若干优势,包括克服了偏向较小键而不利于较大键的偏差。我们从理论和实验两方面分析了 zip-zip 树,例如表明,在包含 n 个节点的 zip-zip 树中,一个节点的期望深度至多为 1.3863log n-1+o(1),这与 treap 以及由均匀随机插入构建的二叉搜索树的期望深度相匹配。然而,与这些其他数据结构不同,zip-zip 树以高概率每个节点仅使用 O(loglog n) 位元数据即可达到其界限,而 treap 每个节点需要 Θ(log n) 位元数据。事实上,我们甚至描述了一种“即时”zip-zip 树变体,它每个节点仅需期望 O(1) 位元数据。此外,我们可以将 zip-zip 树定义为强历史无关的,而 treap 通常只是弱历史无关的。我们还引入了有偏 zip-zip 树,它基于键权重具有显式偏差,因此权重为 w_k 的键 k 的期望深度为 O(log(W/w_k)),其中 W 是有偏 zip-zip 树中所有键的总权重。最后,我们表明可以很容易地使 zip-zip 树部分可持久化,且以高概率仅需 O(n) 的额外空间开销。

英文摘要:

We define simple variants of zip trees, called zip-zip trees, which provide several advantages over zip trees, including overcoming a bias that favors smaller keys over larger ones. We analyze zip-zip trees theoretically and empirically, showing, e.g., that the expected depth of a node in an $n$-node zip-zip tree is at most $1.3863\log n-1+o(1)$, which matches the expected depth of treaps and binary search trees built by uniformly random insertions. Unlike these other data structures, however, zip-zip trees achieve their bounds using only $O(\log\log n)$ bits of metadata per node, w.h.p., as compared to the $Θ(\log n)$ bits per node required by treaps. In fact, we even describe a ``just-in-time'' zip-zip tree variant, which needs just an expected $O(1)$ number of bits of metadata per node. Moreover, we can define zip-zip trees to be strongly history independent, whereas treaps are generally only weakly history independent. We also introduce \emph{biased zip-zip trees}, which have an explicit bias based on key weights, so the expected depth of a key, $k$, with weight, $w_k$, is $O(\log (W/w_k))$, where $W$ is the weight of all keys in the weighted zip-zip tree. Finally, we show that one can easily make zip-zip trees partially persistent with only $O(n)$ space overhead w.h.p.

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

↑