-1

I need to construct a DFA which accepts the following language: $$ L = \{w \in \{a,b\}^{\ast}\mid \#_{a}(w) \bmod 3 = \#_{b}(w) \bmod 2\} $$ I have no clue how to solve this issue. Can you please help me?

Luke Mathieson
  • 18,373
  • 4
  • 60
  • 87

1 Answers1

3

Hint: Keep track of $\#_a(w) \pmod{3}$ and $\#_b(w) \pmod{2}$, using $3\times 2$ states.

Yuval Filmus
  • 280,205
  • 27
  • 317
  • 514