L = w : (na(w) - nb(w)) mod 3 /= 0
How can I go about finding the regular expression for this language?
I understand that it means that the number of As minus the number of Bs cannot be a multiple of 3. So a - b cannot be 3,6,9,12, etc.
But I am still having trouble putting it into a regular expression. I tried first making it a DFA or NFA but I couldn't do that either.
Any help is appreciated!