English

Approximating Large Frequency Moments with Pick-and-Drop Sampling

Data Structures and Algorithms 2012-12-05 v2

Abstract

Given data stream D={p1,p2,...,pm}D = \{p_1,p_2,...,p_m\} of size mm of numbers from {1,...,n}\{1,..., n\}, the frequency of ii is defined as fi={j:pj=i}f_i = |\{j: p_j = i\}|. The kk-th \emph{frequency moment} of DD is defined as Fk=i=1nfikF_k = \sum_{i=1}^n f_i^k. We consider the problem of approximating frequency moments in insertion-only streams for k3k\ge 3. For any constant cc we show an O(n12/klog(n)log(c)(n))O(n^{1-2/k}\log(n)\log^{(c)}(n)) upper bound on the space complexity of the problem. Here log(c)(n)\log^{(c)}(n) is the iterative log\log function. To simplify the presentation, we make the following assumptions: nn and mm are polynomially far; approximation error ϵ\epsilon and parameter kk are constants. We observe a natural bijection between streams and special matrices. Our main technical contribution is a non-uniform sampling method on matrices. We call our method a \emph{pick-and-drop sampling}; it samples a heavy element (i.e., element ii with frequency Ω(Fk)\Omega(F_k)) with probability Ω(1/n12/k)\Omega(1/n^{1-2/k}) and gives approximation fi~(1ϵ)fi\tilde{f_i} \ge (1-\epsilon)f_i. In addition, the estimations never exceed the real values, that is fj~fj \tilde{f_j} \le f_j for all jj. As a result, we reduce the space complexity of finding a heavy element to O(n12/klog(n))O(n^{1-2/k}\log(n)) bits. We apply our method of recursive sketches and resolve the problem with O(n12/klog(n)log(c)(n))O(n^{1-2/k}\log(n)\log^{(c)}(n)) bits.

Keywords

Cite

@article{arxiv.1212.0202,
  title  = {Approximating Large Frequency Moments with Pick-and-Drop Sampling},
  author = {Vladimir Braverman and Rafail Ostrovsky},
  journal= {arXiv preprint arXiv:1212.0202},
  year   = {2012}
}
R2 v1 2026-06-21T22:47:28.283Z