GATE Computer ScienceEasyGATE CS (PYQ pattern)
Let L₁ = { w ∈ {a, b}* : n_a(w) is even } and L₂ = { w : |w| is even }. The minimal complete DFA for L₁ ∩ L₂ has how many states?
- A. 2
- B. 3
- C. 4
- D. 8
Correct answer: C. 4
The pair (n_a mod 2, |w| mod 2) takes all four values (a moves (1,1), b moves (0,1)) and the four are distinguishable: 4 states. Equivalent to 'n_a even and n_b even'.
More Theory of Computation questions
- 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…
- L = { w ∈ {a, b} : na(w) ≡ 1 (mod 3) or w contains bb as a substring }. The minimal complete DFA has how many states?