The GATE Grind

GATE 2012 CS (CS1) – Question 22

Theory of Computation · Regular Expressions and Finite Automata · 1 mark · Multiple choice

Over alphabet {a}, with ε the empty string, find the complement of the language accepted by the shown NFA.

Diagram for GATE 2012 CS (CS1) question 22
  1. $\varnothing$
  2. $\{\epsilon\}$
  3. $a^*$
  4. $\{a,\epsilon\}$

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (B) $\{\epsilon\}$

Explanation

The first a reaches the accepting state. The two ε transitions return to the start, so any positive number of a’s is accepted, but the empty word is not. The complement relative to {a}* is precisely {ε}, B.

More Regular Expressions and Finite Automata questions

All Regular Expressions and Finite Automata questions →