Regular expression of a formal language with a number of a's equal to a multiple of 7 and a number of b's not equal to a multiple of 5?

42 Views Asked by At

\begin{equation} L_{26} = \{w\ |\ |w|_a \equiv 0 \text{ (mod 7)} \wedge |w|_b \not\equiv 0 \text{ (mod 5)}, w \in \{a, b\}^*\} \end{equation}

The language is defined as above, how would one go about designing a regular expression for this? I'm also not to sure how to start, as I'm very new to formal languages and regex. The pieces puzzling me the most are the requirement for a certain amount of a's or b's.