GATE Computer ScienceVery hardGATE CS (PYQ pattern)

An NFA over {a, b} has states 0, 1, 2, 3, start state 0 and accepting set {1, 3}. Transitions: δ(0): a→{2,3}, b→{2}; δ(1): a→{0,3}, b→{2,3}; δ(2): a→{0}, b→{1}; δ(3): a→{0,1,2}, b→{1,2}. Exactly one of the following strings is REJECTED. Which one?

  1. A. baba
  2. B. abab
  3. C. bba
  4. D. aab

Correct answer: A. baba

Track the reachable sets. baba: {0} →b {2} →a {0} →b {2} →a {0}: no accepting state, rejected. abab: {0} →a {2,3} →b {1,2} →a {0,3} →b {1,2} ∋ 1. bba: {2} →b {1} →a {0,3} ∋ 3. aab: {2,3} →a {0,1,2} →b {1,2,3} ∋ 1,3.

More Theory of Computation questions

Exams that ask this topic