,
Sven Dziadek
,
Luc Segoufin
Creative Commons Attribution 4.0 International license
For a fixed regular language L, the enumeration of L-infixes is the following task: we are given an input word w = a₁ ⋯ a_n and we must enumerate the infixes of w that belong to L, i.e., the pairs i ≤ j such that a_i ⋯ a_j ∈ 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 ∈ L and u is a factor of v then v ∈ 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.
@InProceedings{amarilli_et_al:LIPIcs.MFCS.2026.24,
author = {Amarilli, Antoine and Dziadek, Sven and Segoufin, Luc},
title = {{Constant-Time Dynamic Enumeration of Word Infixes in a Regular Language}},
booktitle = {51st International Symposium on Mathematical Foundations of Computer Science (MFCS 2026)},
pages = {24:1--24:17},
series = {Leibniz International Proceedings in Informatics (LIPIcs)},
ISBN = {978-3-95977-442-0},
ISSN = {1868-8969},
year = {2026},
volume = {386},
editor = {Kouck\'{y}, Michal and Petrișan, Daniela},
publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
address = {Dagstuhl, Germany},
URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.MFCS.2026.24},
URN = {urn:nbn:de:0030-drops-274050},
doi = {10.4230/LIPIcs.MFCS.2026.24},
annote = {Keywords: regular language, dynamic membership, enumeration, infix, ZG, automata}
}