Paper record
W2004110412Maintaining Stream Statistics over Sliding Windows
Mayur Datar, Aristides Gionis, Piotr Indyk, Rajeev Motwani
- Year
- 2002
- Venue
- SIAM Journal on Computing
- References
- 13
- Cited by
- 872
Details and counts from OpenAlex.
Abstract
We consider the problem of maintaining aggregates and statistics over data streams, with respect to the last N data elements seen so far. We refer to this model as the sliding window model. We consider the following basic problem: Given a stream of bits, maintain a count of the number of 1's in the last N elements seen from the stream. We show that, using bits of memory, we can estimate the number of 1's to within a factor of . We also give a matching lower bound of memory bits for any deterministic or randomized algorithms. We extend our scheme to maintain the sum of the last N positive integers and provide matching upper and lower bounds for this more general problem as well. We also show how to efficiently compute the L p norms () of vectors in the sliding window model using our techniques. Using our algorithm, one can adapt many other techniques to work for the sliding window model with a multiplicative overhead of in memory and a factor loss in accuracy. These include maintaining approximate histograms, hash tables, and statistics or aggregates such as sum and averages.