Affiliation:
1. Princeton University, Princeton, NJ, USA
2. EECS, UC Berkeley, Berkeley, CA, USA
Abstract
Estimating the ε-approximate quantiles or ranks of a stream is a fundamental task in data monitoring. Given a stream x_1,..., x_n from a universe \mathcalU with total order, an additive-error quantile sketch \mathcalM allows us to approximate the rank of any query y\in \mathcalU up to additive ε n error. In 2001, Greenwald and Khanna gave a deterministic algorithm (GK sketch) that solves the ε-approximate quantiles estimation problem using O(ε^-1 łog(ε n)) space \citegreenwald2001space ; recently, this algorithm was shown to be optimal by Cormode and Vesleý in 2020 \citecormode2020tight. However, due to the intricacy of the GK sketch and its analysis, over-simplified versions of the algorithm are implemented in practical applications, often without any known theoretical guarantees. In fact, it has remained an open question whether the GK sketch can be simplified while maintaining the optimal space bound. In this paper, we resolve this open question by giving a simplified deterministic algorithm that stores at most (2 + o(1))ε^-1 łog (ε n) elements and solves the additive-error quantile estimation problem; as a side benefit, our algorithm achieves a smaller constant factor than the \frac11 2 ε^-1 łog(ε n) space bound in the original GK sketch~\citegreenwald2001space. Our algorithm features an easier analysis and still achieves the same optimal asymptotic space complexity as the original GK sketch. Lastly, our simplification enables an efficient data structure implementation, with a worst-case runtime of O(łog(1/ε) + łog łog (ε n)) per-element for the ordinary ε-approximate quantile estimation problem. Also, for the related "weighted'' quantile estimation problem, we give efficient data structures for our simplified algorithm which guarantee a worst-case per-element runtime of O(łog(1/ε) + łog łog (ε W_n/w_\textrmmin )), achieving an improvement over the previous upper bound of \citeassadi2023generalizing.
Funder
Simons Junior Faculty Award
Publisher
Association for Computing Machinery (ACM)
Reference27 articles.
1. [n. d.]. GKQuantiles Class - Micrometer Core 0.11.0.RELEASE Documentation. https://www.javadoc.io/doc/io. micrometer/micrometer-core/0.11.0.RELEASE/io/micrometer/core/instrument/stats/quantile/GKQuantiles.html. Accessed: 2023--11--15.
2. [n. d.]. Problem 2: Quantiles - Open Problems in Sublinear Algorithms. https://sublinear.info/index.php?title=Open_ Problems:2. Suggested by Graham Cormode, Source: Kanpur 2006, Accessed: 2023--11--15.
3. [n. d.]. quantiles Crate Documentation - Rust. https://docs.rs/quantiles/latest/quantiles/. Accessed: 2023--11--15.
4. Adversarial laws of large numbers and optimal regret in online classification
5. The space complexity of approximating the frequency moments