On the computational complexity of problems related to distinguishability sets

We study the computational complexity of problems related to distinguishability sets for regular languages. Roughly speaking, the distinguishability set \(\mathsf {D}(L)\) for a (not necessarily regular) language \(L\) consists of all words \(w\) that are a common suffix of a word \(xw\) in \(L\) and of a word \(yw\) that does not belong to \(L\). In particular, we investigate the complexity of the representation problem, i.e., deciding for given automata \(A\) and \(B\), whether \(B\) accepts the distinguishability set of \(L(A)\). It is shown that this problem and some of its variants are highly intractable, namely PSPACE-complete. In fact, determining the size of an automaton for \(\mathsf {D}(L(A))\) is already PSPACE-complete. On the other hand, questions related to the hierarchy induced by iterated application of the \(\mathsf {D}\)-operator turn out to be much easier. For instance, the question whether for a given automaton \(A\), the accepted language is equal to its own distinguishability set, i.e., whether \(L(A)=\mathsf {D}(L(A))\) holds, is shown to be NL-complete. As a byproduct of our investigations, we found a compelling characterization of synchronizing automata, namely that a (minimal) automaton \(A\) is synchronizing if and only if \(\mathsf {D}(L(A))=\mathsf {D}^2(L(A))\).