-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,125
  • 4
  • 55
  • 86

1 Answers1

3

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

Yuval Filmus
  • 276,994
  • 27
  • 311
  • 503