Automata Theory Chapter 14
Automata Theory Chapter 14
a. Show that if M is a DFA that recognizes language B, swapping the accept and nonaccept states in M yields a new DFA recognizing the
complement of B. Conclude that the class of regular languages is closed under complement.
b. Show by giving an example that if M is an NFA that recognizes language C, swapping the accept and nonaccept states in M doesn’t necessarily
yield a new NFA that recognizes the complement of C. Is the class of languages recognized by NFAs closed under complement? Explain your
answer.
Step-by-step solution
Step 1 of 4
(a)
Let be the new DFA that has swapped accept and non accept states in M.
• As M recognizes a regular language B, there exists which recognizes complement of B which is also regular.
Comment
Step 2 of 4
(b)
Comments (5)
Step 3 of 4
If we swap accept and non accept states of M then we will get the following
Comment
Step 4 of 4
This shown that swapping accept and non - accept states of NFA doesn’t necessarily yield a new NFA recognizing the complement of the original
one.
“The class of languages recognized by NFAs is precisely the class of languages recognizes by DFAs” …… (a)
Comment