Consider the NFA shown below.

Let the language accepted by be . Let be the language accepted by the NFA obtained by changing the accepting state of to a non-accepting state and by changing the non-accepting states of to accepting states. Which of the following statements is true?
View worked solution
Answer: B
In the given NFA :
- The start state has self-loops for both input symbols and .
- The only accepting state is , while and are non-accepting states.
To construct the NFA , we swap the accepting and non-accepting states of :
- The states and become accepting states in .
- The state becomes a non-accepting state.
Since the start state is now an accepting state in , and it has self-loops on both and , any string can be processed by remaining in . Because is an accepting state, every string is accepted by .
Thus, the language accepted by is:
Free practice · Your answers on this page are not saved.
