GATE / CS ARCHIVE

GATE CSE 2012 / QUESTION 12

Complement of an epsilon-NFA language

Theory of Computation · Finite Automata · Full GATE CSE 2012 paper

GATE 2012, Q12 1 mark · MCQ
Report issue

Finite Automata

Question 12, GATE 2012: Over Σ={a}, an epsilon-NFA has states s (initial, nonaccepting), t (accepting), and u (nonaccepting). Its only transitions are s --a--> t, t --ε--> u, u --ε--> s. What is the complement of its accepted language within Σ*?
(A) ∅ (B) {ε} (C) a* (D) {a,ε}.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

The initial state is nonaccepting. A single a reaches the only accepting state, and two epsilon transitions return from that state through the third state to the initial state. Thus each traversal consumes one a and any positive number of a symbols is accepted; epsilon is not. The language is a⁺ and its complement within {a}*=Σ* is {ε}, B.

Check: The initial epsilon-closure is just {s}; no epsilon move leaves s. Therefore the empty input is rejected. After one a reaches t, epsilon moves can return to s, allowing any further a and accepting again at t.

Original paper, page 3 · Answer key