In many streaming applications recent elements in the stream are considered more important than older elements. In the sliding window model we are given an unbounded stream of elements and the goal is to maintain a data structure which allows performing a certain query (e.g. computing a numerical quantity or verifying a property) on the set or sequence of the last n elements. The number n is called the window size, which can be either a fixed number or controlled online. The challenge is to devise streaming algorithms which avoid maintaining the window explicitly using Θ(n) space.
This thesis considers the language recognition problem in the sliding window problem: Given a formal language (in other words, a property) and a stream of symbols, maintain a small data structure which allows testing whether the current window, i.e. the suffix of length n, belongs to the language (satisfies the property). The main question that we aim to answer is: Which languages admit sliding window algorithms using sublinear space?
The first main result is a space trichotomy (constant, logarithmic, linear) for the space complexity
of regular languages in the fixed- and the variable-size sliding window model, together with language-theoretic descriptions of the space classes. We also study the uniform setting where the regular language is considered as part of the input. On this basis we extend these results in various directions: (i) randomness, (ii) approximation, and (iii) subclasses of context-free languages. We prove a quatrochotomy for the randomized space complexity of regular languages. Concerning approximation, we present a constant-space sliding window property tester for every regular language, which distinguishes between words in the language and words that have large Hamming distance from the language. Finally, we give partial results on context-free languages over sliding windows and extend the space trichotomy for regular languages to the class of visibly pushdown languages.