We study rank estimation in turnstile streams. A frequency vector $f$ over the universe $[U]$ receives insertions and deletions. Given a query $x\in[U]$, the goal is to estimate the rank $\sum_{u<x}f_u$ within additive error $ε\|f\|_1$ with constant probability. The standard approach is Dyadic CountSketch by Luo, Wang, Yi and Cormode, using $\tilde{O}(ε^{-1}\log^{3/2}U\log n)$ bits, where $n$ is the final $\ell_1$ norm of $f$. Bulánek, Kumar, Meka, Nelson, and Sarlós placed this approach in a matrix-factorization framework. They improved the space of Dyadic CountSketch to $O(ε^{-1}\log^{3/2}U)$ words, and proved a lower bound of $Ω(ε^{-1}\log^2(εU))$ bits for all streaming algorithms when $U\le n\le U^{O(1)}$ and $ε=U^{-1+Ω(1)}$. This leaves a gap of $\sqrt{\log U}$. In this work, we fully determine the space cost of rank estimation up to an absolute constant. Our main result is a space lower bound for all streaming algorithms: for $0<ε\le 1/8$ and $n\ge\log^2 U$, the space is at least $Ω(\min\{ε^{-1}L^{3/2}\log(2+nε/\sqrt{L}), ε^{-2}\log U\log n, \log\binom{U+n}{n}\})$ bits, where $L=\log(2+Uε)$. When $U\le n\le U^{O(1)}$ and $ε=U^{-1+Ω(1)}$, this simplifies to $Ω(\min\{ε^{-1}\log^{5/2}U, ε^{-2}\log^2 U\})$ bits. Our proof uses a surprising hard distribution and novel information-theoretic techniques. The above bound matches Dyadic CountSketch when $n\ge U$ and $U^{-1+Ω(1)}\leε\le O(1/\sqrt{\log U})$. The lower bound is also tight in the remaining regimes. For $ε\ge(\log U)^{-1/2}$, there exists an algorithm that uses $O(ε^{-2}\log U\log n)$ bits using $\ell_1$ samplers. For $ε\le U^{-1+o(1)}$, we refine Dyadic CountSketch so that its space in bits matches the first term of the bound.
翻译:暂无翻译