Approximate Counts and Quantiles over Sliding Windows
- Gurmeet Singh Manku ,
- Arvind Arasu
Proceedings of the 23rd ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, PODS 2004 |
Published by Association for Computing Machinery, Inc.
We consider the problem of maintaining approximate counts and quantiles over a stream sliding window using limited space. We consider two types of sliding windows depending on whether the number of elements N in the window is fixed (fixed-size sliding window) or variable (variable-size sliding window). In a fixed-size sliding window, both the ends of the window slide synchronously over the stream. In a variable-size sliding window, an adversary slides the window ends independently, and therefore has the ability to vary the number of elements N in the window.
We present various deterministic and randomized algorithms for approximate counts and quantiles. All of our algorithms require space that is logarithmic in N and linear in 1/e, where is the approximation factor. For quantiles, this space requirement is an improvement over the previous best bound which is quadratic in 1/e. We believe that no previous work on space-efficient approximate counts over sliding windows exists.
Copyright © 2007 by the Association for Computing Machinery, Inc. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from Publications Dept, ACM Inc., fax +1 (212) 869-0481, or permissions@acm.org. The definitive version of this paper can be found at ACM's Digital Library --http://www.acm.org/dl/.