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?

  1. A. 2
  2. B. 3
  3. C. 4
  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

Exams that ask this topic