Pseudorandom Hashing for Space-bounded Computation with Applications in Streaming
- PMID: 40741524
- PMCID: PMC12309723
- DOI: 10.1109/focs57990.2023.00093
Pseudorandom Hashing for Space-bounded Computation with Applications in Streaming
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 without sacrificing space for a large number of data stream algorithms, for example: Andoni's estimation algorithm for constant (ICASSP, 2017) assumes a random oracle, but achieves optimal space and constant update time. Using HashPRG's time-space trade-off we eliminate the random oracle assumption while preserving the other properties. Previously no time-optimal derandomization was known. Using similar techniques, we give an algorithm for a relaxed version of sampling in a turnstile stream. Both of our algorithms use bits of space and have update time.For , the approximate estimation algorithm of Kane et al., (STOC, 2011) uses an optimal bits of space but has an update time of . Using HashPRG, we show that if for an arbitrarily small constant , then we can obtain a approximate estimation algorithm that uses the optimal bits of space and has an update time of in the Word RAM model, which is more than a quadratic improvement in the update time. We obtain similar improvements for entropy estimation.CountSketch, with the fine-grained error analysis of Minton and Price (SODA, 2014). For derandomization, they suggested a direct application of Nisan's generator, yielding a logarithmic multiplicative space overhead. With HashPRG we obtain an efficient derandomization yielding the same asymptotic space as when assuming a random oracle. Our ability to obtain a time-efficient derandomization makes crucial use of HashPRG's symmetry. We also give the first derandomization of a recent private version of CountSketch. For a -dimensional vector being updated in a turnstile stream, we show that can be estimated up to an additive error of using bits of space. Additionally, the update time of this algorithm is in the Word RAM model. We show that the space complexity of this algorithm is optimal up to constant factors. However, for vectors with , we show that the lower bound can be broken by giving an algorithm that uses bits of space which approximates up to an additive error of . 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 in the Word RAM model.
Figures

Similar articles
-
Comparison of Two Modern Survival Prediction Tools, SORG-MLA and METSSS, in Patients With Symptomatic Long-bone Metastases Who Underwent Local Treatment With Surgery Followed by Radiotherapy and With Radiotherapy Alone.Clin Orthop Relat Res. 2024 Dec 1;482(12):2193-2208. doi: 10.1097/CORR.0000000000003185. Epub 2024 Jul 23. Clin Orthop Relat Res. 2024. PMID: 39051924
-
Signs and symptoms to determine if a patient presenting in primary care or hospital outpatient settings has COVID-19.Cochrane Database Syst Rev. 2022 May 20;5(5):CD013665. doi: 10.1002/14651858.CD013665.pub3. Cochrane Database Syst Rev. 2022. PMID: 35593186 Free PMC article.
-
Short-Term Memory Impairment.2024 Jun 8. In: StatPearls [Internet]. Treasure Island (FL): StatPearls Publishing; 2025 Jan–. 2024 Jun 8. In: StatPearls [Internet]. Treasure Island (FL): StatPearls Publishing; 2025 Jan–. PMID: 31424720 Free Books & Documents.
-
Sexual Harassment and Prevention Training.2024 Mar 29. In: StatPearls [Internet]. Treasure Island (FL): StatPearls Publishing; 2025 Jan–. 2024 Mar 29. In: StatPearls [Internet]. Treasure Island (FL): StatPearls Publishing; 2025 Jan–. PMID: 36508513 Free Books & Documents.
-
The Black Book of Psychotropic Dosing and Monitoring.Psychopharmacol Bull. 2024 Jul 8;54(3):8-59. Psychopharmacol Bull. 2024. PMID: 38993656 Free PMC article. Review.
References
-
- Ahn Kook Jin, Guha Sudipto, and McGregor Andrew. Graph sketches: Sparsification, Spanners, and Subgraphs. In Proceedings of the 31st ACM SIGMOD-SIGACT-SIGAI symposium on Principles of Database Systems, pages 5–14, 2012.
-
- Andoni Alexandr, Krauthgamer Robert, and Onak Krzysztof. Streaming algorithms via precision sampling. In 2011 IEEE 52nd Annual Symposium on Foundations of Computer Science, pages 363–372. IEEE, 2011.
-
- Andoni Alexandr. High frequency moments via max-stability. In 2017 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 6364–6368. IEEE, 2017.
-
- Andoni Alexandr, Nguyen Huy L,Polyanskiy Yury, and Wu Yihong. Tight lower bound for linear sketches of moments. In International Colloquium on Automata, Languages, and Programming, pages 25–32. Springer, 2013.
-
- Braverman Vladimir, Chestnut Stephen R., Ivkin Nikita, and Woodruff David P.. Beating CountSketch for heavy hitters in insertion streams. In STOC’16-Proceedings of the 48th Annual ACM SIGACT Symposium on Theory of Computing, pages 740–753. ACM, New York, 2016.
Grants and funding
LinkOut - more resources
Full Text Sources