English

Perfect $L_p$ Sampling with Polylogarithmic Update Time

Data Structures and Algorithms 2025-12-02 v1

Abstract

Perfect LpL_p sampling in a stream was introduced by Jayaram and Woodruff (FOCS 2018) as a streaming primitive which, given turnstile updates to a vector x{poly(n),,poly(n)}nx \in \{-\text{poly}(n), \ldots, \text{poly}(n)\}^n, outputs an index i{1,2,,n}i^* \in \{1, 2, \ldots, n\} such that the probability of returning index ii is exactly Pr[i=i]=xipxpp±1nC,\Pr[i^* = i] = \frac{|x_i|^p}{\|x\|_p^p} \pm \frac{1}{n^C}, where C>0C > 0 is an arbitrarily large constant. Jayaram and Woodruff achieved the optimal O~(log2n)\tilde{O}(\log^2 n) bits of memory for 0<p<20 < p < 2, but their update time is at least nCn^C per stream update. Thus an important open question is to achieve efficient update time while maintaining optimal space. For 0<p<20 < p < 2, we give the first perfect LpL_p-sampler with the same optimal amount of memory but with only poly(logn)\text{poly}(\log n) update time. Crucial to our result is an efficient simulation of a sum of reciprocals of powers of truncated exponential random variables by approximating its characteristic function, using the Gil-Pelaez inversion formula, and applying variants of the trapezoid formula to quickly approximate it.

Cite

@article{arxiv.2512.00632,
  title  = {Perfect $L_p$ Sampling with Polylogarithmic Update Time},
  author = {William Swartworth and David P. Woodruff and Samson Zhou},
  journal= {arXiv preprint arXiv:2512.00632},
  year   = {2025}
}

Comments

FOCS 2025

R2 v1 2026-07-01T08:01:06.959Z