English

Succinct Choice Dictionaries

Data Structures and Algorithms 2017-03-17 v3

Abstract

The choice dictionary is introduced as a data structure that can be initialized with a parameter nN={1,2,}n\in\mathbb{N}=\{1,2,\ldots\} and subsequently maintains an initially empty subset SS of {1,,n}\{1,\ldots,n\} under insertion, deletion, membership queries and an operation choice that returns an arbitrary element of SS. The choice dictionary appears to be fundamental in space-efficient computing. We show that there is a choice dictionary that can be initialized with nn and an additional parameter tNt\in\mathbb{N} and subsequently occupies n+O(n(t/w)t+logn)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)O(t) time on a word RAM with a word length of w=Ω(logn)w=\Omega(\log n) bits. In particular, with w=Θ(logn)w=\Theta(\log n), we can support insert, delete, contains and choice in constant time using n+O(n/(logn)t)n+O(n/(\log n)^t) bits for arbitrary fixed tt. We extend our results to maintaining several pairwise disjoint subsets of {1,,n}\{1,\ldots,n\}. We study additional space-efficient data structures for subsets SS of {1,,n}\{1,\ldots,n\}, including one that supports only insertion and an operation extract-choice that returns and deletes an arbitrary element of SS. All our main data structures can be initialized in constant time and support efficient iteration over the set SS, and we can allow changes to SS while an iteration over SS 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 GG with nn vertices and mm edges, we can output a spanning forest of GG in O(n+m)O(n+m) time with at most (1+ϵ)n(1+\epsilon)n bits of working memory for arbitrary fixed ϵ>0\epsilon>0.

Keywords

Cite

@article{arxiv.1604.06058,
  title  = {Succinct Choice Dictionaries},
  author = {Torben Hagerup and Frank Kammer},
  journal= {arXiv preprint arXiv:1604.06058},
  year   = {2017}
}
R2 v1 2026-06-22T13:37:05.374Z