finite state machine tool
Enter a finite state machine box below by defining its transitions, then initial state and final state(s) using the following notation:
q0, a -> q1
q0, b -> q1
q1, a -> q1
q1, b -> q0

You can list more than one final state, one on each line. Each transition goes on its own line. The format is: state, symbol -> new_state
You can then give an input word and it will run the machine on that word.
finite automaton description
input word