🤖 AI Summary
This work addresses the problem of efficiently enumerating infixes belonging to a fixed regular language \( L \) from a dynamic string that supports character substitution updates. Focusing on the class of semi-extendable ZG regular languages containing neutral letters, the paper presents the first dynamic algorithm that achieves constant-time updates and constant-delay enumeration using only constant additional memory. Through a careful analysis grounded in formal language theory and automaton structure, the authors provide multiple equivalent characterizations of this language class and demonstrate fundamental limitations that prevent straightforward generalization to broader classes of regular languages.
📝 Abstract
For a fixed regular language $L$, the enumeration of $L$-infixes is the following task: we are given an input word $w = a_1 \cdots a_n$ and we must enumerate the infixes of $w$ that belong to $L$, i.e., the pairs $i \leq j$ such that $a_i \cdots a_j \in L$. We are interested in dynamic enumeration of $L$-infixes, where we must additionally support letter substitution updates on $w$ (e.g.,"replace the $i$-th letter of $w$ by a letter $a$"). Each update changes the set of infixes to enumerate, and resets the enumeration state. We study for which regular languages $L$ we can perform dynamic enumeration of $L$-infixes in constant delay (i.e., the next infix is always produced in constant time) and constant additional memory throughout the enumeration, while supporting each update in constant time. We show that, for languages $L$ with a neutral letter, if the language $L$ belongs to the class ZG and is extensible (i.e., if $u \in L$ and $u$ is a factor of $v$ then $v \in L$), then dynamic enumeration of $L$-infixes can be achieved with a simple algorithm that ensures constant-time updates and constant delay, but not constant additional memory. Our main contribution is then to show an algorithm that additionally uses only constant additional memory, and applies to a more general class of semi-extensible ZG languages for which we give several equivalent characterizations. We further discuss whether our results can be generalized to larger language classes and show some (conditional) lower bounds.