Locality Testing for NFAs is PSPACE-complete
Antoine Amarilli, Mikaël Monet, Rémi De Pretto
TL;DR
This paper studies the problem of deciding whether the language $\mathcal{L}(A)$ recognized by an input NFA $A$ is local. It shows the decision problem is $\mathsf{PSPACE}$-complete, even when restricted to infix-free languages, contrasting with the $\mathsf{PTIME}$ result for DFAs. Membership in $\mathsf{PSPACE}$ follows from standard NFA-inclusion techniques, while hardness is established via a Greibach-inspired reduction from NFA universality that constructs a language $L' = \#_1(a^*\#_2 L + aa\#_2 \Sigma^*)\#_3$ which is local iff $L = \Sigma^*$. This work clarifies the complexity landscape of locality testing for regular languages and informs applications in data validation and query processing that rely on local language properties.
Abstract
The class of local languages is a well-known subclass of the regular languages that admits many equivalent characterizations. In this short note we establish the PSPACE-completeness of the problem of determining, given as input a nondeterministic finite automaton (NFA) A, whether the language recognized by A is local or not. This contrasts with the case of deterministic finite automata (DFA), for which the problem is known to be in PTIME.
