Creative Commons Attribution 3.0 Unported license
We show that for all given n,t,w in {1,2,...} with n<2^w, an array of n entries of w bits each can be represented on a word RAM with a word length of w bits in at most nw+ceil(n(t/(2 w))^t) bits of uninitialized memory to support constant-time initialization of the whole array and 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+ceil(n/w^t) bits for arbitrary fixed t, to be compared with nw+Theta(n) bits for the best previous solution, and at the opposite end, still with constant-time initialization, we support O(log n)-time access with just nw+1 bits, which is optimal for arbitrary access times if the initialization executes fewer than n steps.
@InProceedings{hagerup_et_al:LIPIcs.ISAAC.2017.44,
author = {Hagerup, Torben and Kammer, Frank},
title = {{On-the-Fly Array Initialization in Less Space}},
booktitle = {28th International Symposium on Algorithms and Computation (ISAAC 2017)},
pages = {44:1--44:12},
series = {Leibniz International Proceedings in Informatics (LIPIcs)},
ISBN = {978-3-95977-054-5},
ISSN = {1868-8969},
year = {2017},
volume = {92},
editor = {Okamoto, Yoshio and Tokuyama, Takeshi},
publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
address = {Dagstuhl, Germany},
URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ISAAC.2017.44},
URN = {urn:nbn:de:0030-drops-82527},
doi = {10.4230/LIPIcs.ISAAC.2017.44},
annote = {Keywords: data structures, space efficiency, constant-time initialization, on-the-fly initialization, arrays}
}