How do I construct a DFA over the alphabet {0,1,2} that only accepts strings that have an even number of 0, 1, 2?

454 Views Asked by At

Example: 00,0011,0022102120, etc. is fine 00112,0221100, etc. is wrong

I have done similar thing with the alphabet {0,1} and strings that have equal number of 0 and 1.

Here I run into a problem where it seems that my automata just keeps "expanding"...

1

There are 1 best solutions below

1
On

Here is the solution. I feel so stupid for spending a day to do this. Thanks for help