GATE / CS ARCHIVE

GATE CSE 2017 SET 2 / QUESTION 39

GATE CSE 2017 Set 2 Q39

Theory of Computation · Finite Automata · Full GATE CSE 2017 Set 2 paper

GATE 2017 Set 2, Q39 2 marks · MCQ
Report issue

Finite Automata

Question 39, GATE 2017: An ε-NFA has transition table (ε,a,b): q0→({q2},{q1},{q0}); q1→({q2},{q2},{q3}); q2→({q0},∅,∅); q3→(∅,∅,{q2}). Compute the extended transition from q2 on aba. A:∅. B:{q0,q1,q3}. C:{q0,q1,q2}. D:{q0,q2,q3}.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Step through it (4 steps)

1. Begin with ε-closure({q2}), not just {q2}. The ε edge reaches q0, whose ε edge returns to q2, so the starting set is {q0,q2}.

2. Read the first a: only q0 has an a transition, to q1. The ε-closure of q1 adds q2 and q0, giving {q0,q1,q2}. Read b next: q0 goes to q0 and q1 to q3; q2 has no b move. Closing {q0,q3} under ε adds q2, giving {q0,q2,q3}.

3. Read the final a: only q0 contributes q1. Its ε-closure is again {q0,q1,q2}, option C. Applying ε-closure both before input and after every consumed symbol is essential; ε transitions do not consume letters of aba.

Original paper, page 15 · Answer key