Regular Languages in the Sliding Window Model
Moses Ganardi, Danny Hucke, Markus Lohrey, Konstantinos Mamouras, Tatiana Starikovskaya
TL;DR
This work analyzes the space complexity of recognizing the last-window membership of a fixed regular language L in sliding-window streams. It establishes a deterministic space trichotomy, linking constant, logarithmic, and linear space to structural language classes, and extends to a randomized setting that yields a four-way tetrachotomy, with precise class-based characterizations. The authors introduce the path-summary technique and right-deterministic automata to obtain sublinear space in many cases, and they develop sliding window testers (deterministic and randomized) that solve approximate testing with tight space bounds. They also connect these results to property testing, offering constant-space testers for many regular languages and detailing lower bounds via standard communication-complexity reductions. Overall, the paper maps the exact landscape of sliding-window language recognition in both deterministic and randomized models, including testers, and highlights the limits and opportunities for sublinear space in streaming contexts.
Abstract
We study the space complexity of the following problem: For a fixed regular language $L$, we receive a stream of symbols and want to test membership of a sliding window of size $n$ in $L$. For deterministic streaming algorithms we prove a trichotomy theorem, namely that the (optimal) space complexity is either constant, logarithmic or linear, measured in the window size $n$. Additionally, we provide natural language-theoretic characterizations of the space classes. We then extend the results to randomized streaming algorithms and we show that in this setting, the space complexity of any regular language is either constant, doubly logarithmic, logarithmic or linear. Finally, we introduce sliding window testers, which can distinguish whether a sliding window of size $n$ belongs to the language $L$ or has Hamming distance $> εn$ to $L$. We prove that every regular language has a deterministic (resp., randomized) sliding window tester that requires only logarithmic (resp., constant) space.
