GATE Computer ScienceHardGATE CS (PYQ pattern)
Let L₁ = { w ∈ {a, b}* : n_a(w) ≡ 0 (mod 4) } and L₂ = { w : |w| ≡ 0 (mod 6) }. The minimal complete DFA for L₁ ∩ L₂ has how many states?
- A. 12
- B. 10
- C. 48
- D. 24
Correct answer: D. 24
The pair (n_a mod 4, |w| mod 6) is moved by (1, 1) on a and (0, 1) on b; these generate all of Z₄ × Z₆, so all 24 pairs are reachable, and all are distinguishable.
More Theory of Computation questions
- Let L₁ = { w ∈ {a, b} : na(w) is even } and L₂ = { w : |w| is even }. The minimal complete DFA for L₁ ∩ L₂ has how many states?
- Over {0, 1} (MSB first, ε counted as 0), L = { w : w is divisible by 5 and w contains 11 as a substring }. How many states does the…
- How many strings of length 6 over {a, b} contain both ab and ba as substrings?
- How many states does the minimal complete DFA for { w ∈ {a, b} : ab occurs EXACTLY twice as a substring } have?
- L = { w ∈ {a, b} : #ab(w) ≡ #ba(w) (mod 3) }, where #ab and #ba count occurrences of these substrings. How many states does the minimal…
- L = { w ∈ {a, b} : |w| ≥ 2 and the 2nd symbol from the left equals the 2nd symbol from the right }. How many states does the minimal…