Skip to content
Official PYQ · 2012

GATE CS 2012 Q12 — Regular Expressions and Finite Automata

Explain with AI

What is the complement of the language accepted by the NFA shown below?
Assume Σ={a}\Sigma = \{a\} and ϵ\epsilon is the empty string.

Choose one option
View worked solution

Answer: B

To find the complement of the language accepted by the given NFA, we first determine the language LL accepted by it.

Step 1: Analyze the NFA

  • The NFA starts at the initial state and requires at least one transition on symbol aa to reach an accepting state.
  • Once in the accepting state, any number of additional aa's can be read.
  • Therefore, the language accepted by the NFA is: L=a+={a,aa,aaa,… }L = a^+ = \{a, aa, aaa, \dots\}

Step 2: Find the Complement

The alphabet is given as Σ={a}\Sigma = \{a\}. The set of all possible strings over this alphabet is:

Σ∗={a}∗={ϵ,a,aa,aaa,… }\Sigma^* = \{a\}^* = \{\epsilon, a, aa, aaa, \dots\}

The complement of the language LL (denoted as L‾\overline{L}) is defined as:

L‾=Σ∗∖L\overline{L} = \Sigma^* \setminus L L‾={ϵ,a,aa,aaa,… }∖{a,aa,aaa,… }\overline{L} = \{\epsilon, a, aa, aaa, \dots\} \setminus \{a, aa, aaa, \dots\} L‾={ϵ}\overline{L} = \{\epsilon\}

Thus, the complement of the language accepted by the NFA is {ϵ}\{\epsilon\}.

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

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