Abstract
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.
Part of this work was done while the author was visiting IBM Almaden Research Center. Supported by NSF Grant CCR-9820897.
Work supported by a Sloan Research Fellowship and an NSF Career Award.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
N. Alon, Y. Matias, and M. Szegedy. The space complexity of approximating the frequency moments. Journal of Computer and System Sciences, 58(1):137–147, 1999.
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.
E. Cohen. Size-estimation framework with applications to transitive closure and reachability. Journal of Computer and System Sciences, 55(3):441–453, 1997.
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.
P. Flajolet and G. N. Martin. Probabilistic counting algorithms for data base applications. Journal of Computer and System Sciences, 31:182–209, 1985.
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.
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.
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.
K.-Y. Whang, B. T. Vander-Zanden, and H. M. Taylor. A linear-time probabilistic counting algorithm for database applications. ACM Transactions on Database Systems, 15(2):208–229, 1990.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2002 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Bar-Yossef, Z., Jayram, T.S., Kumar, R., Sivakumar, D., Trevisan, L. (2002). Counting Distinct Elements in a Data Stream. In: Rolim, J.D.P., Vadhan, S. (eds) Randomization and Approximation Techniques in Computer Science. RANDOM 2002. Lecture Notes in Computer Science, vol 2483. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45726-7_1
Download citation
DOI: https://doi.org/10.1007/3-540-45726-7_1
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-44147-2
Online ISBN: 978-3-540-45726-8
eBook Packages: Springer Book Archive