We present an algorithm for finding frequent elements in a stream where the arrivals are not bursty. Depending on the amount of burstiness in the stream our algorithm detects elements with frequency at least t with space between O(F_1/t~2) and O(F_2/t~2) where F_1 and F_2 are the first and the second frequency moments of the stream respectively. The latter space complexity is achieved when the stream is completely bursty; I.e., most elements arrive in contiguous groups, and the former is attained when the arrival order is random. Our space complexity is O(αF_1/t~2) where α is a parameter that captures the burstiness of a stream and lies between 1 and F_2/F_1. A major advantage of our algorithm is that even if the relative frequencies of the different elements is fixed, the space complexity decreases with the length of the stream if the stream is not bursty.
展开▼