In automata theory, McNaughton's theorem refers to a theorem that asserts that the set of ÃÂ-regular languages is identical to the set of languages recognizable by deterministic Muller automata. This theorem is proven by supplying an algorithm to construct a deterministic Muller automaton for any ÃÂ-regular language and vice versa.
This theorem has many important consequences. Since (non-deterministic) Büchi automata and ÃÂ-regular languages are equally expressive, the theorem implies that Büchi automata and deterministic Muller automata are equally expressive. Since complementation of deterministic Muller automata is trivial, the theorem implies that Büchi automata/ÃÂ-regular languages are closed under complementation.
In McNaughton's original paper, the theorem was stated as:
<blockquote>"An ÃÂ-event is regular if and only if it is finite-state."</blockquote>
In modern terminology, ÃÂ-events are commonly referred to as ÃÂ-languages. Following McNaughton's definition, an ÃÂ-event is a finite-state event if there exists a deterministic Muller automaton that recognizes it.
One direction of the theorem can be proven by showing that any given Muller automaton recognizes an ÃÂ-regular language.
Suppose A = (Q,ã,ô,q<sub>0</sub>,F) is a deterministic Muller automaton. The union of finitely many ÃÂ-regular languages produces an ÃÂ-regular language; therefore it can be assumed without loss of generality that the Muller acceptance condition F contains exactly one set of states {q<sub>1</sub>, ... ,q<sub>n</sub>}. Let ñ be the regular language whose elements will take A from q<sub>0</sub> to q<sub>1</sub>. For 1â¤iâ¤n, let ò<sub>i</sub> be a regular language whose elements take A from q<sub>i</sub> to q<sub>(i mod n)+1</sub> without passing through any state outside of {q<sub>1</sub>, ... ,q<sub>n</sub>}. It is claimed that ñ(ò<sub>1</sub> ... ò<sub>n</sub>)<sup>ÃÂ</sup> is the ÃÂ-regular language recognized by the Muller automaton A. It is proved as follows.
Suppose w is a word accepted by A. Let àbe the run that led to the acceptance of w. For a time instant t, let ÃÂ(t) be the state visited by àat time t. We create an infinite and strictly increasing sequence of time instants t<sub>1</sub>, t<sub>2</sub>, ... such that only states in {q<sub>1</sub>, ... ,q<sub>n</sub>'} appear after time t<sub>1</sub>, and for each a and b, ÃÂ(t<sub>na+b</sub>) = q<sub>b</sub>. Such a sequence exists because all and only the states of {q<sub>1</sub>, ... ,q<sub>n</sub>} appear in àinfinitely often. By the above definitions of ñ and ò's, it can be easily shown that the existence of such a sequence implies that w is an element of ñ(ò<sub>1</sub> ... ò<sub>n</sub>)<sup>ÃÂ</sup>.
Conversely, suppose w â ñ(ò<sub>1</sub> ... ò<sub>n</sub>)<sup>ÃÂ</sup>. Due to definition of ñ, there is an initial segment of w that is an element of ñ and thus leads A to the state q<sub>1</sub>. From there on, the run never assumes a state outside of {q<sub>1</sub>, ... ,q<sub>n</sub>}, due to the definitions of the ò's, and all the states in the set are repeated infinitely often. Therefore, A accepts the word w.
The other direction of the theorem can be proven by showing that there exists a deterministic Muller automaton that recognizes a given ÃÂ-regular language.
The union of finitely many deterministic Muller automata can be easily constructed; therefore without loss of generality we assume that the given ÃÂ-regular language is of the form ñò<sup>ÃÂ</sup>. Consider an ÃÂ-word w=a<sub>1</sub>a<sub>2</sub>... â ñò<sup>ÃÂ</sup>. Let w(i,j) be the finite segment a<sub>i+1</sub>,...,a<sub>j-1</sub>a<sub>j</sub> of w. For building a Muller automaton for ñò<sup>ÃÂ</sup>, we introduce the following two concepts with respect to w.
Let p be the number of states in the minimum deterministic finite automaton A<sup>ò*</sup> to recognize language ò*. Now we prove two lemmas about the above two concepts.
We have used both the concepts of "favor" and "equivalence" in Lemma 2. Now, we are going to use the lemma to construct a Muller automaton for language ñò<sup>ÃÂ</sup>. The proposed automaton will accept a word if and only if a time i exists such that it will satisfy the right hand side of Lemma 2. The machine below is described informally. Note that this machine will be a deterministic Muller automaton.
The machine contains p+2 deterministic finite automaton and a master controller, where p is the size of A<sup>ò*</sup>. One of the p+2 machine can recognize ñò* and this machine gets input in every cycle. And, it communicates at any time i to the master controller whether or not w(0,i) â ñò*. The rest of p+1 machines are copies of A<sup>ò*</sup>. The master can set the A<sup>ò*</sup> machines dormant or active. If master sets a A<sup>ò*</sup> machine to be dormant then it remains in its initial state and oblivious to the input. If master activates a A<sup>ò*</sup> machine then it reads the input and moves, until master makes it dormant and force it back to the initial state. Master can make a A<sup>ò*</sup> machine active and dormant as many times as it wants. The master stores the following information about the A<sup>ò*</sup> machines at each time instant.
Initially, the master may behave 2 different ways depending on ñ. If ñ contains empty word then only one of the A<sup>ò*</sup> is active otherwise none of the A<sup>ò*</sup> machines are active at the start. Later at some time i, if w(0,i) â ñò* and none of A<sup>ò*</sup> machines are in initial state then master activates one of the dormant machines and the just activated A<sup>ò*</sup> machine start receiving input from time i+1. At some time, if two A<sup>ò*</sup> machines reach to the same state then master makes the machine dormant that was activated later than the other. Note that the master can make the above decisions using the information it stores.
For the output, the master also have a pair of red and green lights corresponding to each A<sup>ò*</sup> machine. If a A<sup>ò*</sup> machine goes from active state to dormant state then corresponding red light flashes. The green light for some A<sup>ò*</sup> machine M, which was activated at j, flashes at time i in the following two situations:
Note that the green light for M does not flash every time when a machine goes dormant due to M.
The above description of a full machine can be viewed as a large deterministic automaton. Now, it is left to define the Muller acceptance condition. In this large automaton, we define ü<sub>n</sub> to be the set of states in which the green light flashes and the red light does not flash corresponding to n<sup>th</sup> A<sup>ò*</sup> machine. Let ý<sub>n</sub> be the set of states in which the red light does not flash corresponding to n<sup>th</sup> A<sup>ò*</sup> machine. So, Muller acceptance condition F = { S | âÂÂn ü<sub>n</sub> â S â ý<sub>n</sub> }. This finishes the construction of the desired Muller automaton. Q.E.D.
Since McNaughton's proof, many other proofs have been proposed. The following are some of them.