GATE Computer ScienceEasyGATE CS (PYQ pattern)
Consider L = { w ∈ {a, b}* : every a in w is immediately followed by a b }. The minimal complete DFA for L has how many states?
- A. 2
- B. 4
- C. 3
- D. 5
Correct answer: C. 3
Start/accepting (not owing a b), a state owing a b (non-accepting), and the dead state (a followed by a): 3 states.
More Theory of Computation questions
- L = { w ∈ {a, b} : the 5th symbol from the right is a } needs 32 states in a minimal DFA. Its reversal Lᴿ needs how many states in a…
- An NFA over {a, b} has states 0, 1, 2, 3, start state 0 and accepting set {2,3}. Transitions: δ(0): a→{2,3}, b→{3}; δ(1): a→∅, b→{1}…
- An NFA over {a, b} has states 0, 1, 2, 3, start state 0 and accepting set {3}. Transitions: δ(0): a→{3}, b→{1,2}; δ(1): a→{0}, b→{1,3}…
- 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}…
- An NFA over {a, b} has states 0, 1, 2, 3, start state 0 and accepting set {0}. Transitions: δ(0): a→{3}, b→∅; δ(1): a→{1,3}, b→{3}; δ(2)…
- An NFA over {a, b} has states 0, 1, 2, 3, start state 0 and accepting set {0,2}. Transitions: δ(0): a→{0}, b→{1,3}; δ(1): a→{0,1}, b→{0}…