English

Regular Languages in the Sliding Window Model

Formal Languages and Automata Theory 2025-03-12 v2

Abstract

We study the space complexity of the following problem: For a fixed regular language LL, we receive a stream of symbols and want to test membership of a sliding window of size nn in LL. 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 nn. 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 nn belongs to the language LL or has Hamming distance >ϵn> \epsilon n to LL. We prove that every regular language has a deterministic (resp., randomized) sliding window tester that requires only logarithmic (resp., constant) space.

Keywords

Cite

@article{arxiv.2402.13385,
  title  = {Regular Languages in the Sliding Window Model},
  author = {Moses Ganardi and Danny Hucke and Markus Lohrey and Konstantinos Mamouras and Tatiana Starikovskaya},
  journal= {arXiv preprint arXiv:2402.13385},
  year   = {2025}
}

Comments

75 pages. This is the TheoretiCS journal version

R2 v1 2026-06-28T14:55:08.091Z