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

B树结构的缓存遗忘表示

Cache-Oblivious Representation of B-Tree Structures

Lukáš Ondráček, Ondřej Mička

AI总结:

本文提出缓存遗忘数据结构CORoBTS,结合vEB布局与压缩内存数组动态存储类B树,在保持最优搜索I/O复杂度的同时,支持子树插入删除并改进部分持久数组的空间复杂度。

摘要:

我们提出了一种通用的数据结构CORoBTS,用于以缓存遗忘的方式动态存储类B树搜索树,它将van Emde Boas内存布局与压缩内存数组相结合。迄今为止,在使用vEB布局时,人们主要考虑的是搜索复杂度。我们展示了子树和连续内存区域的深度优先搜索复杂度,并更深入地揭示了树中顶点位置与内存中位置之间的关系。我们描述了如果能够模拟任意树的深度优先搜索,如何以vEB布局构建该树。类似地,我们考察了压缩内存数组的批量更新。在CORoBTS中,所存储的搜索树必须满足所有叶子处于相同深度,且顶点的分支数介于所选常数$a$和$b$之间。该数据结构支持以最优I/O复杂度$\mathcal{O}(\log_B{N})$进行搜索,并以线性空间存储。它提供插入和删除子树的操作;两者的摊销I/O复杂度均为$\mathcal{O}(S\cdot(\log^2 N)/B + \log_B N\cdot\log\log S + 1)$,摊销时间复杂度均为$\mathcal{O}(S\cdot\log^2 N)$,其中$S$为子树的大小,$N$为整个所存储树的大小。如果各树层上的顶点数量不变,重建现有子树可在两种复杂度中省去乘性的$\mathcal{O}(\log^2 N)$因子;否则,仅为被插入/删除的顶点付出该代价。修改Davoodi等人[ESA, pages 296-308. Springer, 2014]提出的缓存遗忘部分持久数组以使用CORoBTS,可将其空间复杂度从$\mathcal{O}(U^{\log_2 3} + V \log U)$改进为$\mathcal{O}(U + V \log U)$,其中$U$是数组的最大规模,$V$是版本数;当前读取和持久读取的数据局部性与I/O复杂度保持不变;写入的I/O复杂度会因一个多对数因子而变差。

英文摘要:

We propose a general data structure CORoBTS for storing B-tree-like search trees dynamically in a cache-oblivious way combining the van Emde Boas memory layout with packed memory array. In the use of the vEB layout mostly search complexity was considered, so far. We show the complexity of depth-first search of a subtree and contiguous memory area and provide better insight into the relationship between positions of vertices in tree and in memory. We describe how to build an arbitrary tree in vEB layout if we can simulate its depth-first search. Similarly, we examine batch updates of packed memory array. In CORoBTS, the stored search tree has to satisfy that all leaves are at the same depth and vertices have arity between the chosen constants $a$ and $b$. The data structure allows searching with an optimal I/O complexity $\mathcal{O}(\log_B{N})$ and is stored in linear space. It provides operations for inserting and removing a subtree; both have an amortized I/O complexity $\mathcal{O}(S\cdot(\log^2 N)/B + \log_B N\cdot\log\log S + 1)$ and amortized time complexity $\mathcal{O}(S\cdot\log^2 N)$, where $S$ is the size of the subtree and $N$ the size of the whole stored tree. Rebuilding an existing subtree saves the multiplicative $\mathcal{O}(\log^2 N)$ in both complexities if the number of vertices on individual tree levels is not changed; it is paid only for the inserted/removed vertices otherwise. Modifying cache-oblivious partially persistent array proposed by Davoodi et al. [ESA, pages 296-308. Springer, 2014] to use CORoBTS improves its space complexity from $\mathcal{O}(U^{\log_2 3} + V \log U)$ to $\mathcal{O}(U + V \log U)$, where $U$ is the maximal size of the array and $V$ is the number of versions; the data locality and I/O complexity of both present and persistent reads are kept unchanged; I/O complexity of writes is worsened by a polylogarithmic factor.

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

↑