Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
166 tokens/sec
GPT-4o
7 tokens/sec
Gemini 2.5 Pro Pro
42 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Nearly Optimal Distinct Elements and Heavy Hitters on Sliding Windows (1805.00212v3)

Published 1 May 2018 in cs.DS

Abstract: We study the distinct elements and $\ell_p$-heavy hitters problems in the sliding window model, where only the most recent $n$ elements in the data stream form the underlying set. We first introduce the composable histogram, a simple twist on the exponential (Datar et al., SODA 2002) and smooth histograms (Braverman and Ostrovsky, FOCS 2007) that may be of independent interest. We then show that the composable histogram along with a careful combination of existing techniques to track either the identity or frequency of a few specific items suffices to obtain algorithms for both distinct elements and $\ell_p$-heavy hitters that are nearly optimal in both $n$ and $\epsilon$. Applying our new composable histogram framework, we provide an algorithm that outputs a $(1+\epsilon)$-approximation to the number of distinct elements in the sliding window model and uses $\mathcal{O}\left(\frac{1}{\epsilon2}\log n\log\frac{1}{\epsilon}\log\log n+\frac{1}{\epsilon}\log2 n\right)$ bits of space. For $\ell_p$-heavy hitters, we provide an algorithm using space $\mathcal{O}\left(\frac{1}{\epsilonp}\log3 n\left(\log\log n+\log\frac{1}{\epsilon}\right)\right)$ for $0<p\le 2$, improving upon the best-known algorithm for $\ell_2$-heavy hitters (Braverman et al., COCOON 2014), which has space complexity $\mathcal{O}\left(\frac{1}{\epsilon4}\log3 n\right)$. We also show lower bounds of $\Omega\left(\frac{1}{\epsilon}\log2 n+\frac{1}{\epsilon2}\log n\right)$ for distinct elements and $\Omega\left(\frac{1}{\epsilonp}\log2 n\right)$ for $\ell_p$-heavy hitters.

Citations (25)

Summary

We haven't generated a summary for this paper yet.