Singleton-language test for finite automata

ID: singleton-language-test-for-finite-automata

To decide whether a finite-state automaton accepts exactly one distinct word, first obtain some accepted word by a finite automaton emptiness test. If there is none, answer no. Otherwise construct a finite-state automaton for the accepted formal language minus the singleton and test it for emptiness. Answer yes exactly when that difference is empty. Subset construction handles multiple accepting runs without confusing runs with distinct words.

New to topics? Read the docs here!