English

An embarrassingly parallel optimal-space cardinality estimation algorithm

Data Structures and Algorithms 2023-07-04 v1

Abstract

In 2020 Blasiok (ACM Trans. Algorithms 16(2) 3:1-3:28) constructed an optimal space streaming algorithm for the cardinality estimation problem with the space complexity of O(ε2ln(δ1)+lnn)\mathcal O(\varepsilon^{-2} \ln(\delta^{-1}) + \ln n) where ε\varepsilon, δ\delta and nn denote the relative accuracy, failure probability and universe size, respectively. However, his solution requires the stream to be processed sequentially. On the other hand, there are algorithms that admit a merge operation; they can be used in a distributed setting, allowing parallel processing of sections of the stream, and are highly relevant for large-scale distributed applications. The best-known such algorithm, unfortunately, has a space complexity exceeding Ω(ln(δ1)(ε2lnlnn+lnn))\Omega(\ln(\delta^{-1}) (\varepsilon^{-2} \ln \ln n + \ln n)). This work presents a new algorithm that improves on the solution by Blasiok, preserving its space complexity, but with the benefit that it admits such a merge operation, thus providing an optimal solution for the problem for both sequential and parallel applications. Orthogonally, the new algorithm also improves algorithmically on Blasiok's solution (even in the sequential setting) by reducing its implementation complexity and requiring fewer distinct pseudo-random objects.

Keywords

Cite

@article{arxiv.2307.00985,
  title  = {An embarrassingly parallel optimal-space cardinality estimation algorithm},
  author = {Emin Karayel},
  journal= {arXiv preprint arXiv:2307.00985},
  year   = {2023}
}

Comments

Conference version to appear at the 27th International Conference on Randomization and Computation (RANDOM 2023)

R2 v1 2026-06-28T11:20:43.775Z