GATE Computer ScienceEasyGATE CS (PYQ pattern)
Let L = { w ∈ {a, b}* : n_a(w) is divisible by 3 }. How many states does the minimal complete DFA for the concatenation L·L have?
- A. 9
- B. 6
- C. 3
- D. 1
Correct answer: C. 3
w ∈ L·L iff w splits into two parts with a-counts ≡ 0 (mod 3) each, which forces n_a(w) ≡ 0; conversely any w ∈ L splits as w·ε. So L·L = L and still needs 3 states (the 9-state product is a trap).
More Theory of Computation questions
- How many states does the minimal complete DFA have for { w ∈ {a, b} : w contains exactly two a's OR exactly two b's }?
- How many states does the minimal complete DFA have for { w ∈ {a, b} : |w| is divisible by 3 and the second-last symbol of w is a }?
- How many states does the minimal complete DFA for { w ∈ {a, b} : w begins with a } have?
- Let L = { w ∈ {a, b} : the 3rd symbol from the right is a } (minimal DFA: 8 states) and Lᴿ its reversal (the 3rd symbol from the LEFT is…
- Let L = { w ∈ {a, b} : na(w) = 2·nb(w) }. The prefix language Pref(L) = { x : xy ∈ L for some y }. How many states does the minimal…
- Let L = (a + b)abb. The right quotient L / b = { w : wb ∈ L } has a minimal complete DFA with how many states?