Exactly as the title says, I'm looking for a DFA for an even number of A, odd number of B, and exactly one C, can anyone help with this?
Thanks
Exactly as the title says, I'm looking for a DFA for an even number of A, odd number of B, and exactly one C, can anyone help with this?
Thanks
A common idiom for problems like this is to use the states to remember what has been seen so far: are there an even number of A's or not; are there an even number of B's or not; are there 0, 1, 2 or more C's?
For example, having seen the input ABAABCA, we would be in state (even A's, even B's, 1 C) and then if we see an A we would pass to state (odd A's, even B's, 1 C). I'll leave it to you to determine which of the twelve states should be the start and which should be the final state.
Divide and conquer. You could design a DFA over the alphabet $\Sigma = \{A,B,C\}$
Then design a new DFA equivalent to $M_1 \cap M_2 \cap M_3$ (by closure properties of regular languages).