The input is a long stream \sigma = \langle a_1, a_2, \cdots, a_m \rangle consisting of m elements where each element takes a value from the universe [n].
The goal is to approximate some value while using a small amount of space.
We start by initializing an empty associative array A.
For the processing of i:
Given an element a, the output is \hat f_a = A[a] (or zero).
Given a parameter k, this algorithm uses a single pass and O(k(\log m + \log n)) space to return an estimate for any a satisfying
f_a - \frac{m}{k} \le \hat f_a \le f_a