7 // number of states 2 // alphabet size 2 // ID of the initial state 1 4 // IDs of the final/accepting state(s) 0 1 3 // transitions from state 0 go to states 1 and 3 1 2 4 // transitions from state 1 go to states 2 and 4 2 5 1 // transitions from state 2 go to states 5 and 1 3 6 3 // etc. 4 0 5 5 4 5 6 -1 4 // transitions from state 6 go to implicit dead state and state 4