Finding Frequent Elements in non-bursty Streams

  • Rina Panigrahy ,
  • Dilys Thomas

Annual European Symposium on Algorithms (ESA) |

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(F1/t2)and˜ O(F2/t2)whereF1 and F2 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(αF1/t2) whereα is a parameter that captures the burstiness of a stream and lies between 1 and F2/F1. 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.