GATE Computer ScienceHardGATE CSE
Over {a, b}, L = { w : the fourth symbol from the right end of w is a }. How many states does the minimal complete DFA of L have?
- A. 8
- B. 15
- C. 32
- D. 16
Correct answer: D. 16
The DFA must remember the last 4 symbols (2⁴ = 16 histories are pairwise distinguishable); 16 is also enough.
More Theory of Computation questions
- How many strings of length 8 over {a, b} contain aa as a substring but do not contain bb as a substring?
- An NFA with ε-moves over {a, b} has states 0–4, start 0 and accepting state 4. Transitions: 0 –ε→ 1, 2 –ε→ 3; δ(0,a) = {0}; δ(1,b) = {2}…
- The grammar S → SS | a | b is ambiguous. How many distinct parse trees does it give for the string ababa?
- How many strings of length 8 does the grammar S → aSb | bSa | SS | ε generate?
- Consider these statements. I. Deterministic context-free languages are closed under complementation. II. Deterministic context-free…
- For a Turing machine M given as input, how many of these properties are undecidable? (a) L(M) = ∅ (b) M has at least 5 states (c) L(M)…