English

On-the-Fly Array Initialization in Less Space

Data Structures and Algorithms 2017-10-02 v1

Abstract

We show that for all given n,t,w{1,2,...}n,t,w \in \{1,2,...\} with n<2wn<2^w, an array of nn entries of ww bits each can be represented on a word RAM with a word length of ww bits in at most nw+n(t/(2w))tnw+\lceil n(t/(2 w))^t\rceil bits of uninitialized memory to support constant-time initialization of the whole array and O(t)O(t)-time reading and writing of individual array entries. At one end of this tradeoff, we achieve initialization and access (i.e., reading and writing) in constant time with nw+n/wtnw+\lceil n/w^t\rceil bits for arbitrary fixed tt, to be compared with nw+Θ(n)nw+\Theta(n) bits for the best previous solution, and at the opposite end, still with constant-time initialization, we support O(logn)O(\log n)-time access with just nw+1nw+1 bits, which is optimal for arbitrary access times if the initialization executes fewer than nn steps.

Keywords

Cite

@article{arxiv.1709.10477,
  title  = {On-the-Fly Array Initialization in Less Space},
  author = {Torben Hagerup and Frank Kammer},
  journal= {arXiv preprint arXiv:1709.10477},
  year   = {2017}
}