I need to create a non-empty DFA over the language {a,b,c} with the following properties:
- First symbol is a.
- Has an even number of b’s.
- Last symbol is a c.
I was just wondering, should I create 3 seperate automatas, and then combine them using intersections, or should I just create the one, and if that is the case, how can it has an even number of b’s? I know I can alternate the states, but not sure how to do it with it all combined.
Thanks
Here’s your automaton (assuming that 0 is even and therefor 0 b’s is ok):
Where is “end-of-input”.
State 1: even number of b’s, the last symbol processed not c.
State 2: even number of b’s, the last symbol processed is c.
State 3: odd number of b’s.