## 1-Pass Relative-Error Lp-Sampling with Applications

Citations: | 15 - 7 self |

### BibTeX

@MISC{Monemizadeh_1-passrelative-error,

author = {Morteza Monemizadeh and David P. Woodruff},

title = {1-Pass Relative-Error Lp-Sampling with Applications},

year = {}

}

### OpenURL

### Abstract

For any p ∈ [0, 2], we give a 1-pass poly(ε −1 log n)-space algorithm which, given a data stream of length m with insertions and deletions of an n-dimensional vector a, with updates in the range {−M, −M + 1, · · · , M − 1, M}, outputs a sample of [n] = {1, 2, · · · , n} for which for all i the probability that i is returned is (1 ± ɛ) |ai | p Fp(a) ± n −C, where ai denotes the (possibly negative) value of coordinate i, Fp(a) = ∑n i=1 |ai|p = ||a| | p p denotes the p-th frequency moment (i.e., the p-th power of the Lp norm), and C> 0 is an arbitrarily large constant. Here we assume that n, m, and M are polynomially related. Our generic sampling framework improves and unifies algorithms for several communication and streaming problems, including cascaded norms, heavy hitters, and moment estimation. It also gives the first relative-error forward sampling algorithm in a data stream with deletions, answering an open question of Cormode et al. 1