GATE / CS ARCHIVE

GATE CSE 2014 SET 1 / QUESTION 16

GATE CSE 2014 Set 1 Q16

Theory of Computation · Finite Automata · Full GATE CSE 2014 Set 1 paper

GATE 2014 Set 1, Q16 1 mark · MCQ
Report issue

Finite Automata

Question 16, GATE 2014: An NFA starts at q₀ and has accepting state q₃. Its transitions are q₀→q₀ on 0 or 1; q₀→q₁ on 1; q₁→q₂ on 0 or 1; q₂→q₂ on 1; q₂→q₃ on 0 or 1. There are no other transitions. Which states are reachable after reading 0011? A: {q₀,q₁,q₂}. B: {q₀,q₁}. C: {q₀,q₁,q₂,q₃}. D: {q₃}.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

1. Method and setup. Track a set of active states after each symbol; an NFA can follow several transitions at once. Each update uses only the states active before that symbol, so a newly reached q₂ cannot immediately take another transition on the very same input symbol. Acceptance is separate from the requested reachable-state set.

2. Work through the result and its assumptions. Starting at{q0}, the two zeros leave{q0}. The first 1 yields{q0, q1}; the second 1 yields{q0, q1, q2}. No q2 was reached early enough to enter q3. Thus A.

Original paper, page 11 · Answer key