arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1802.05471cs.DSmath.CO
收藏

平滑堆和自调整数据结构的双重视图

Smooth heaps and a dual view of self-adjusting data structures

László Kozma, Thatchaphol Saranurak

摘要:

我们提出了一个新的连接自调整二叉搜索树(BST)和堆,两个基本的,广泛研究,和实际相关的家庭数据结构。粗略地说,我们将自然模型中的任意堆算法映射到相应的BST算法,该算法在双操作序列上具有相同的成本(即时间和密钥空间角色切换的相同序列)。这是两个数据结构族之间的第一个通用转换。有一个丰富的理论动态优化BST(即BST算法之间的竞争理论)。在文献中已经注意到堆缺乏类似的理论。通过我们的连接,我们转移到一个通用的堆模型的BST已知的所有实例特定的下限,启动堆的动态优化理论。在算法方面,我们得到了一个新的,简单而有效的堆算法,我们称之为光滑堆。我们表明,光滑堆是贪婪,BST算法与最强的证明,并从文献中,被广泛认为是实例最优的属性堆对应。假设贪婪的最优性,平滑堆在我们的堆算法模型中也是最优的。作为推论的贪婪已知的结果,我们获得特定于实例的上界的光滑堆,自适应排序中的应用。有趣的是,平滑堆虽然是从一个不实用的BST算法中派生出来的,但它简单且易于实现(例如,除了键和树指针之外,它不存储任何辅助数据)。它可以被看作是流行的配对堆数据结构的变体,用"两个选择的幂"类型的启发式扩展它。

英文摘要:

We present a new connection between self-adjusting binary search trees (BSTs) and heaps, two fundamental, extensively studied, and practically relevant families of data structures. Roughly speaking, we map an arbitrary heap algorithm within a natural model, to a corresponding BST algorithm with the same cost on a dual sequence of operations (i.e. the same sequence with the roles of time and key-space switched). This is the first general transformation between the two families of data structures. There is a rich theory of dynamic optimality for BSTs (i.e. the theory of competitiveness between BST algorithms). The lack of an analogous theory for heaps has been noted in the literature. Through our connection, we transfer all instance-specific lower bounds known for BSTs to a general model of heaps, initiating a theory of dynamic optimality for heaps. On the algorithmic side, we obtain a new, simple and efficient heap algorithm, which we call the smooth heap. We show the smooth heap to be the heap-counterpart of Greedy, the BST algorithm with the strongest proven and conjectured properties from the literature, widely believed to be instance-optimal. Assuming the optimality of Greedy, the smooth heap is also optimal within our model of heap algorithms. As corollaries of results known for Greedy, we obtain instance-specific upper bounds for the smooth heap, with applications in adaptive sorting. Intriguingly, the smooth heap, although derived from a non-practical BST algorithm, is simple and easy to implement (e.g. it stores no auxiliary data besides the keys and tree pointers). It can be seen as a variation on the popular pairing heap data structure, extending it with a "power-of-two-choices" type of heuristic.

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

↑