Motivated by an application in computational topology, we consider a novel variant of the problem of efficiently maintaining dynamic rooted trees. This variant requires merging two paths in a single operation. In contrast to the standard problem, in which only one tree arc changes at a time, a single merge operation can change many arcs. In spite of this, we develop a data structure that supports merges on an n-node forest in O(log^2 n) amortized time and all other standard tree operations in O(log n) time (amortized, worst-case, or randomized depending on the underlying data structure). For the special case that occurs in the motivating application, in which arbitrary arc deletions (cuts) are not allowed, we give a data structure with an O(log n) time bound per operation. This is asymptotically optimal under certain assumptions. For the even-more special case in which both cuts and parent queries are disallowed, we give an alternative O(log n)-time solution that uses standard dynamic trees as a black box. This solution also applies to the motivating application. Our methods use previous work on dynamic trees in various ways, but the analysis of each algorithm requires novel ideas. We also investigate lower bounds for the problem under various assumptions.
Hypersuccinct Trees -- New universal tree source codes for optimal compressed tree data structures and range minima
我们提出了一个新的通用源代码的分布无标记的二进制和有序树,实现最佳的压缩范围内较低的顺序为现有的通用代码所涵盖的所有树源。同时,它支持在字RAM上以恒定时间回答压缩表示上的许多导航查询;这对于任何现有的树压缩方法都是不可能的。由此产生的数据结构,“超简洁树”,因此结合了由最好的通用代码实现的压缩与最好的简洁树数据结构的操作支持。我们应用超简洁树,以获得一个通用的压缩数据结构的范围最小查询。它具有恒定的查询时间和$2n+o(n)$位的最佳最坏情况空间使用,但是对于$n$元素的随机排列,空间平均下降到$1.736n + o(n)$位,而对于$r$增加运行的数组,空间平均下降到$2\lg\binom nr + o(n)$位。这两个结果都是最优的;前者回答了Davoodi et al.(2014)和Golin et al.(2016)的一个开放问题。与以前的工作相比,简洁的数据结构,我们不需要定制我们的数据结构,以特定的应用程序;超简洁的树自动适应手头的树。我们表明,它们同时实现了最佳的空间利用率,以在较低的顺序项范围广泛的分布在树的形状,包括:通过随机阵列的随机顺序插入生成的二叉搜索树(BST)/笛卡尔树、随机条纹平衡BST、具有给定数目的二进制/一元/叶节点的二叉树、从无记忆源生成的随机二进制尝试、全二叉树、一元路径以及均匀选择的权重平衡BST、AVL树和左倾红黑树。