Sliding window order statistics in sublinear space
arXiv:1807.04400
Abstract
We extend the multi-pass streaming model to sliding window problems, and address the problem of computing order statistics on fixed-size sliding windows, in the multi-pass streaming model as well as the closely related communication complexity model. In the -pass streaming model, we show that on input of length with values in range and a window of length , sliding window minimums can be computed in . We show that this is nearly optimal (for any constant number of passes) when , but can be improved when to . Furthermore, we show that there is an -pass streaming algorithm which computes -smallest elements in space. In the communication complexity model, we describe a simple algorithm to compute minimums in rounds of communication for odd , and a more involved algorithm which computes the -smallest elements in space. Finally, we prove that the majority statistic on boolean streams cannot be computed in sublinear space, implying that -smallest elements cannot be computed in space both sublinear in and independent of .