GATE Computer ScienceVery hardGATE CSE
Over {a, b}, L = { w : w contains aab as a substring and |w| is odd }. What is the number of states in the minimal complete DFA for L?
- A. 8
- B. 7
- C. 9
- D. 11
Correct answer: A. 8
Before aab is seen the DFA needs the matching progress (0, 1 or 2 symbols of aab matched) and the parity of the length; after aab only parity matters. Minimising the product gives 8 states.
More Theory of Computation questions
- Decimal numerals are read most significant digit first (empty string = 0, leading zeros allowed). What is the number of states in the…
- Let L = { w ∈ {a, b} : the third symbol from the right end of w is a }; its minimal complete DFA has 8 states. How many states does the…
- Let L = { a^i b^j c^k : i ≠ j or j ≠ k, i, j, k ≥ 0 }. Which statement is correct?
- A DFA over {a, b} has states 0–3, start 0 and accepting state 3. Transitions: 0 –a→ 1, 0 –b→ 0; 1 –a→ 2, 1 –b→ 0; 2 –a→ 2, 2 –b→ 3; 3 –a→…
- A TM (blank B) has rules: δ(q0,a) = (q1,X,R); δ(q0,Y) = (q3,Y,R); δ(q0,B) = (qa,B,S); δ(q1,a) = (q1,a,R); δ(q1,Y) = (q1,Y,R); δ(q1,b) =…
- Which regular expression (over {a, b}, + means union) generates exactly the strings with an even number of b's?