GATE Computer ScienceVery hardGATE CSE · NIELIT

An ε-NFA over {a, b} has states 0–4, start 0, accepting state 4. Moves: 0 –ε→ 1; 0 –a→ {0,1}; 1 –b→ 2; 2 –ε→ 3; 3 –a→ {3,4}; 4 –b→ 2. How many of the 64 strings of length 6 are accepted?

  1. A. 12
  2. B. 18
  3. C. 7
  4. D. 26

Correct answer: A. 12

Simulate the NFA with ε-closures on all 64 strings (or take the subset DFA and count paths): 12 are accepted.

More Theory of Computation questions

Exams that ask this topic