Streaming Algorithms with Few State Changes
Open Access
- 10 May 2024
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Management of Data
- Vol. 2 (2) , 1-28
Abstract
In this paper, we study streaming algorithms that minimize the number of changes made to their internal state (i.e., memory contents). While the design of streaming algorithms typically focuses on minimizing space and update time, these metrics fail to capture the asymmetric costs, inherent in modern hardware and database systems, of reading versus writing to memory. In fact, most streaming algorithms write to their memory on every update, which is undesirable when writing is significantly more expensive than reading. This raises the question of whether streaming algorithms with small space and number of memory writes are possible. We first demonstrate that, for the fundamental F p moment estimation problem with p ≥ 1, any streaming algorithm that achieves a constant factor approximation must make Ω(n 1-1/p ) internal state changes, regardless of how much space it uses. Perhaps surprisingly, we show that this lower bound can be matched by an algorithm which also has near-optimal space complexity. Specifically, we give a (1+ε)-approximation algorithm for F p moment estimation that use a near-optimal ~O ε (n 1-1/p ) number of state changes, while simultaneously achieving near-optimal space, i.e., for p∈[1,2), our algorithm uses poly(log n,1/ε) bits of space for, while for p>2, the algorithm uses ~O ε (n 1-1/p ) space. We similarly design streaming algorithms that are simultaneously near-optimal in both space complexity and the number of state changes for the heavy-hitters problem, sparse support recovery, and entropy estimation. Our results demonstrate that an optimal number of state changes can be achieved without sacrificing space complexity.Keywords
All Related Versions
Funding Information
- NSF (2335411)
This publication has 74 references indexed in Scilit:
- Streaming Algorithms via Precision Sampling2011
- Design implications of memristor-based RRAM cross-point structures2011
- An improved data stream summary: the count-min sketch and its applicationsJournal of Algorithms, 2005
- An information statistics approach to data stream and communication complexityJournal of Computer and System Sciences, 2004
- Finding frequent items in data streamsTheoretical Computer Science, 2004
- Tracking Join and Self-Join Sizes in Limited StorageJournal of Computer and System Sciences, 2002
- The Space Complexity of Approximating the Frequency MomentsJournal of Computer and System Sciences, 1999
- On the time and space complexity of computation using write-once memory or is pen really much worse than pencil?Theory of Computing Systems, 1992
- Book Review: One-dimensional stable distributionsBulletin of the American Mathematical Society, 1989
- Finding repeated elementsScience of Computer Programming, 1982