English

Sliding window order statistics in sublinear space

Data Structures and Algorithms 2018-07-13 v1

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 22-pass streaming model, we show that on input of length NN with values in range [0,R][0,R] and a window of length KK, sliding window minimums can be computed in O~(N)\widetilde{O}(\sqrt{N}). We show that this is nearly optimal (for any constant number of passes) when RKR \geq K, but can be improved when R=o(K)R = o(K) to O~(NR/K)\widetilde{O}(\sqrt{NR/K}). Furthermore, we show that there is an (l+1)(l+1)-pass streaming algorithm which computes lthl^\text{th}-smallest elements in O~(l3/2N)\widetilde{O}(l^{3/2} \sqrt{N}) space. In the communication complexity model, we describe a simple O~(pN1/p)\widetilde{O}(pN^{1/p}) algorithm to compute minimums in pp rounds of communication for odd pp, and a more involved algorithm which computes the lthl^\text{th}-smallest elements in O~(pl2N1/(p2l1))\widetilde{O}(pl^2 N^{1/(p-2l-1)}) space. Finally, we prove that the majority statistic on boolean streams cannot be computed in sublinear space, implying that lthl^\text{th}-smallest elements cannot be computed in space both sublinear in NN and independent of ll.

Keywords

Cite

@article{arxiv.1807.04400,
  title  = {Sliding window order statistics in sublinear space},
  author = {Dhruv Rohatgi},
  journal= {arXiv preprint arXiv:1807.04400},
  year   = {2018}
}
R2 v1 2026-06-23T02:58:27.350Z