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?
Asked
Active
Viewed 308 times
1 Answers
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