Skip to content
Official PYQ · 2003

GATE CS 2003 Q55 — Regular Expressions and Finite Automata

Explain with AI

Consider the NFA MM shown below.

Let the language accepted by MM be LL. Let L1L_1 be the language accepted by the NFA M1M_1 obtained by changing the accepting state of MM to a non-accepting state and by changing the non-accepting states of MM to accepting states. Which of the following statements is true?

Choose one option
View worked solution

Answer: B

In the given NFA MM:

  • The start state q0q_0 has self-loops for both input symbols 00 and 11.
  • The only accepting state is q2q_2, while q0q_0 and q1q_1 are non-accepting states.

To construct the NFA M1M_1, we swap the accepting and non-accepting states of MM:

  • The states q0q_0 and q1q_1 become accepting states in M1M_1.
  • The state q2q_2 becomes a non-accepting state.

Since the start state q0q_0 is now an accepting state in M1M_1, and it has self-loops on both 00 and 11, any string w∈{0,1}∗w \in \{0,1\}^* can be processed by remaining in q0q_0. Because q0q_0 is an accepting state, every string is accepted by M1M_1.

Thus, the language accepted by M1M_1 is:

L1={0,1}∗L_1 = \{0,1\}^*

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Regular Expressions and Finite Automata questions