English

Pseudorandom Hashing for Space-bounded Computation with Applications in Streaming

Data Structures and Algorithms 2024-01-05 v2

Abstract

We revisit Nisan's classical pseudorandom generator (PRG) for space-bounded computation (STOC 1990) and its applications in streaming algorithms. We describe a new generator, HashPRG, that can be thought of as a symmetric version of Nisan's generator over larger alphabets. Our generator allows a trade-off between seed length and the time needed to compute a given block of the generator's output. HashPRG can be used to obtain derandomizations with much better update time and \emph{without sacrificing space} for a large number of data stream algorithms, such as FpF_p estimation in the parameter regimes p>2p > 2 and 0<p<20 < p < 2 and CountSketch with tight estimation guarantees as analyzed by Minton and Price (SODA 2014) which assumed access to a random oracle. We also show a recent analysis of Private CountSketch can be derandomized using our techniques. For a dd-dimensional vector xx being updated in a turnstile stream, we show that x\|x\|_{\infty} can be estimated up to an additive error of εx2\varepsilon\|x\|_{2} using O(ε2log(1/ε)logd)O(\varepsilon^{-2}\log(1/\varepsilon)\log d) bits of space. Additionally, the update time of this algorithm is O(log1/ε)O(\log 1/\varepsilon) in the Word RAM model. We show that the space complexity of this algorithm is optimal up to constant factors. However, for vectors xx with x=Θ(x2)\|x\|_{\infty} = \Theta(\|x\|_{2}), we show that the lower bound can be broken by giving an algorithm that uses O(ε2logd)O(\varepsilon^{-2}\log d) bits of space which approximates x\|x\|_{\infty} up to an additive error of εx2\varepsilon\|x\|_{2}. We use our aforementioned derandomization of the CountSketch data structure to obtain this algorithm, and using the time-space trade off of HashPRG, we show that the update time of this algorithm is also O(log1/ε)O(\log 1/\varepsilon) in the Word RAM model.

Keywords

Cite

@article{arxiv.2304.06853,
  title  = {Pseudorandom Hashing for Space-bounded Computation with Applications in Streaming},
  author = {Praneeth Kacham and Rasmus Pagh and Mikkel Thorup and David P. Woodruff},
  journal= {arXiv preprint arXiv:2304.06853},
  year   = {2024}
}

Comments

Minor writing improvements

R2 v1 2026-06-28T10:05:31.091Z