| A |
|
| A |
|
| A |
|
| A |
|
As an example of the correspondence between an nfa and a right-linear grammar, the following automaton and grammar both recognize the set of strings consisting of an even number of 0's and an even number of 1's.
| S S S A A B B C C |
|