The Equivalence Problem of E-Pattern Languages with Length Constraints is Undecidable
Dirk Nowotka, Max Wiedenhöft
TL;DR
This work investigates pattern languages augmented with length and regular constraints, proving that the erasing equivalence problem becomes undecidable when length constraints are allowed, and that terminal-free inclusion is undecidable for non-erasing patterns over sufficiently large alphabets. It further shows that introducing regular constraints together with length constraints yields undecidability of the non-erasing equivalence problem, marking the first upper bounds for undecidability in this combined-contraint setting. Membership remains NP-complete, underscoring a sharp divide between feasible and infeasible decision problems in constrained pattern languages. The results build on reductions from nondeterministic 2-counter automata and universal Turing machines, linking longstanding open questions to constrained language frameworks with precise, constructible encodings. Together, these findings map the decidability landscape for core questions (membership, inclusion, equivalence) across constrained pattern languages and set the stage for addressing remaining open cases.
Abstract
Patterns are words with terminals and variables. The language of a pattern is the set of words obtained by uniformly substituting all variables with words that contain only terminals. Length constraints restrict valid substitutions of variables by associating the variables of a pattern with a system (or disjunction of systems) of linear diophantine inequalities. Pattern languages with length constraints contain only words in which all variables are substituted to words with lengths that fulfill such a given set of length constraints. We consider membership, inclusion, and equivalence problems for erasing and non-erasing pattern languages with length constraints. Our main result shows that the erasing equivalence problem - one of the most prominent open problems in the realm of patterns - becomes undecidable if length constraints are allowed in addition to variable equality. Additionally, it is shown that the terminal-free inclusion problem, a prominent problem which has been shown to be undecidable in the binary case for patterns without any constraints, is also generally undecidable for all larger alphabets in this setting. Finally, we also show that considering regular constraints, i.e., associating variables also with regular languages as additional restrictions together with length constraints for valid substitutions, results in undecidability of the non-erasing equivalence problem. This sets a first upper bound on constraints to obtain undecidability in this case, as this problem is trivially decidable in the case of no constraints and as it has unknown decidability if only regular- or only length-constraints are considered.
