Counting Distinct Elements in a Data Stream
We present three algorithms to count the number of distinct elements in a data stream to within a factor of 1 ±ε. Our algorithms improve upon known algorithms for this problem, and offer a spectrum of time/space tradeoffs.
KeywordsData Stream Hash Function Error Probability Distinct Element Computer Science Division
Unable to display preview. Download preview PDF.
- [BKS02]Z. Bar-Yossef, R. Kumar, and D. Sivakumar. Reductions in streaming algorithms, with an application to counting triangles in graphs. In Proceedings of the 13th Annual ACM-SIAM Symposium on Discrete Algorithms, pages 623–632, 2002.Google Scholar
- [CW77]L. Carter and M. Wegman. Universal classes of hash functions. In Proceedings of the 9th ACM Annual Symposium on Theory of Computing, pages 106–112, 1977. Journal version in Journal of Computer and System Sciences, 18(2) 143-154, 1979.Google Scholar
- [GT01]P. Gibbons and S. Tirthapura. Estimating simple functions on the union of data streams. In Proceedings of the 13th ACM Symposium on Parallel Algorithms and Architectures, pages 281–291, 2001.Google Scholar
- [HNSS96]P.J. Haas, J.F. Naughton, S. Seshadri, and A.N. Swami. Selectivity and cost estimation for joins based on random sampling. Journal of Computer and System Sciences, 52(3), 1996.Google Scholar
- [WC79]M. Wegman and L. Carter. New classes and applications of hash functions. In Proceedings of the 20th IEEE Annual Symposium on Foundations of Computer Science, pages 175–182, 1979. Journal version titled “New Hash Functions and Their Use in Authentication and Set Equality” in Journal of Computer and System Sciences, 22(3): 265-279, 1981.Google Scholar