41.0k views
1 vote
If Mis a DFA that recognizes language B, you can manipulate the accept and non-accept states of M to yield a new DFA, M', that recognizes the complement of B.

A. Determine the manipulation you need to obtain M'.
B. Show that M' recognizes the complement of B. You do not need an inductive or particularly formal proof, but you must convincingly argue it.
C. Conclude, formally, that the class of regular languages is closed under complement.

1 Answer

4 votes

Final answer:

By swapping the accept and non-accept states in a DFA M that recognizes language B, we can create a new DFA M' that recognizes the complement of B, demonstrating that the class of regular languages is closed under complement.

Step-by-step explanation:

If M is a Deterministic Finite Automaton (DFA) that recognizes a language B, we can create a new DFA, denoted as M', that recognizes the complement of B. To construct M', we simply swap the accept and non-accept states of M. In M, an accept state is one where the string is considered part of language B, while a non-accept state means the string is not part of B. By switching these states in M' for all states of M, any string that was accepted by M is now rejected by M', and vice versa.

Consequently, M' recognizes exactly all the strings that do not belong to B, since every string that used to be accepted by the original DFA M is now being rejected, and strings previously rejected are now accepted. This argument implies that M' indeed recognizes the complement of B. Hence, since a DFA for B can be transformed to recognize the complement of B, the class of regular languages is closed under the operation of taking complements, formalizing the conclusion that regular languages are closed under complement.

User John McAleely
by
8.3k points