Skip to main content
QUICK REVIEW

[论文解读] On-the-Fly Array Initialization in Less Space

Torben Hagerup, Frank Kammer|arXiv (Cornell University)|Apr 20, 2016
Algorithms and Data Compression参考文献 57被引用 19
一句话总结

本文提出了一种空间高效的选取字典数据结构,支持在 O(t) 时间内进行插入、删除、成员查询和选取操作,使用 n + O(n(t/w)^t + log n) 位空间,当 w = Θ(log n) 时可实现常数时间操作。该结构实现了最优冗余,并支持在次线性工作内存下进行线性时间图算法,如生成森林和最短路径树构造。

ABSTRACT

The choice dictionary is introduced as a data structure that can be initialized with a parameter $n\in\mathbb{N}=\{1,2,\ldots\}$ and subsequently maintains an initially empty subset $S$ of $\{1,\ldots,n\}$ under insertion, deletion, membership queries and an operation choice that returns an arbitrary element of $S$. The choice dictionary appears to be fundamental in space-efficient computing. We show that there is a choice dictionary that can be initialized with $n$ and an additional parameter $t\in\mathbb{N}$ and subsequently occupies $n+O(n(t/w)^t+\log n)$ bits of memory and executes each of the four operations insert, delete, contains (i.e., a membership query) and choice in $O(t)$ time on a word RAM with a word length of $w=Ω(\log n)$ bits. In particular, with $w=Θ(\log n)$, we can support insert, delete, contains and choice in constant time using $n+O(n/(\log n)^t)$ bits for arbitrary fixed $t$. We extend our results to maintaining several pairwise disjoint subsets of $\{1,\ldots,n\}$. We study additional space-efficient data structures for subsets $S$ of $\{1,\ldots,n\}$, including one that supports only insertion and an operation extract-choice that returns and deletes an arbitrary element of $S$. All our main data structures can be initialized in constant time and support efficient iteration over the set $S$, and we can allow changes to $S$ while an iteration over $S$ is in progress. We use these abilities crucially in designing the most space-efficient algorithms known for solving a number of graph and other combinatorial problems in linear time. In particular, given an undirected graph $G$ with $n$ vertices and $m$ edges, we can output a spanning forest of $G$ in $O(n+m)$ time with at most $(1+ε)n$ bits of working memory for arbitrary fixed $ε>0$.

研究动机与目标

  • 设计一种动态数据结构,支持插入、删除、成员查询和选取操作,且空间开销最小。
  • 在仅使用 n + o(n) 位内存的前提下实现常数时间操作,尤其适用于 w = Θ(log n) 的字长随机存取机(word RAM)。
  • 将该数据结构扩展以支持额外操作,如 p-秩、p-选择和迭代,同时保持空间效率。
  • 为基本图问题(如生成森林和最短路径树构造)提供空间高效的算法。
  • 在时间和空间约束下,建立系统化选取字典冗余的紧致界限。

提出的方法

  • 通过在位向量表示中使用三色方案,系统性地设计选取字典,以支持高效的插入、删除和选取操作。
  • 在 w = Ω(log n) 位的字长随机存取机模型下,通过将操作分组为大小为 t 的块,实现每项操作 O(t) 时间复杂度。
  • 采用混合表示方法:对大集合(|W| ≥ n/w)使用位向量,对小集合(|W| < n/w)使用无色选取字典,并动态切换。
  • 利用选取操作的灵活性——返回集合 S 中的任意元素——设计空间优化的算法,而无需确定性选择。
  • 将选取字典作为构建模块用于图算法,即使在动态更新期间也能支持对集合的迭代。
  • 通过信息论冗余分析证明空间界限,表明在 O(t) 时间约束下,最小冗余为 Θ(n/(tw))。

实验结果

研究问题

  • RQ1在 w 位字长随机存取机上,支持 O(t) 时间操作的动态选取字典,其最小冗余是多少?
  • RQ2能否利用选取操作设计出用于图问题(如生成森林和最短路径树构造)的空间高效算法?
  • RQ3如何在保持常数时间操作的同时,稳健地支持动态变化集合的迭代?
  • RQ4在系统化动态字典中,时间复杂度 O(t) 与空间使用 n + o(n) 之间存在何种权衡?
  • RQ5能否在保持 O(t) 时间性能的同时,以低冗余支持额外操作如 p-秩和 p-选择?

主要发现

  • 选取字典可实现为 n + O(n(t/w)^t + log n) 位,支持在 w 位字长随机存取机上以 O(t) 时间完成插入、删除、包含查询和选取操作。
  • 当 w = Θ(log n) 时,该数据结构使用 n + O(n/(log n)^t) 位空间,可实现所有四项操作的 O(1) 时间复杂度,对任意固定 t 成立。
  • 当 tw = O(n/log n) 时,具有 O(t) 时间操作的系统化选取字典的最小冗余为 Θ(n/(tw))。
  • 在冗余为 O(n log log n / log n) 的条件下,可在 O(1) 时间内均匀随机选取集合 S 中的一个元素。
  • 该数据结构支持对 S 的稳健并发安全迭代,即使在插入和删除操作期间也能保持正确性。
  • 选取字典支持图问题的线性时间算法:生成森林可在 O(n + m) 时间内完成,最多使用 (1 + ε)n 位空间;最短路径树构造可在 O(n + m) 时间内完成,使用 n log₂3 + O(n/(log n)^t) 位空间。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。