Dynamic Membership for Regular Tree Languages
Abstract
We study the dynamic membership problem for regular tree languages under relabeling updates: we fix an alphabet and a regular tree language over (expressed, e.g., as a tree automaton), we are given a tree with labels in , and we must maintain the information of whether the tree belongs to while handling relabeling updates that change the labels of individual nodes in . Our first contribution is to show that this problem admits an algorithm for any fixed regular tree language, improving over known algorithms. This generalizes the known upper bound over words, and it matches the lower bound of from dynamic membership to some word languages and from the existential marked ancestor problem. Our second contribution is to introduce a class of regular languages, dubbed almost-commutative tree languages, and show that dynamic membership to such languages under relabeling updates can be decided in constant time per update. Almost-commutative languages generalize both commutative languages and finite languages: they are the analogue for trees of the ZG languages enjoying constant-time dynamic membership over words. Our main technical contribution is to show that this class is conditionally optimal when we assume that the alphabet features a neutral letter, i.e., a letter that has no effect on membership to the language. More precisely, we show that any regular tree language with a neutral letter which is not almost-commutative cannot be maintained in constant time under the assumption that the prefix-U1 problem from (Amarilli, Jachiet, Paperman, ICALP'21) also does not admit a constant-time algorithm.
Keywords
Cite
@article{arxiv.2504.17536,
title = {Dynamic Membership for Regular Tree Languages},
author = {Antoine Amarilli and Corentin Barloy and Louis Jachiet and Charles Paperman},
journal= {arXiv preprint arXiv:2504.17536},
year = {2025}
}
Comments
44 pages including 16 pages of main text and 2 pages of bibliography. This is the full version with proofs of the MFCS'25 article: the main text of the article is identical to the MFCS'25 version up to minor changes