 
 
 
 
 
 
 
  
We will let each state in the NFA correspond to a non-terminal in the
grammar.  Each symbol used on the transitions corresponds to a
terminal symbol. 
Let  denote the non-terminal corresponding to state
 denote the non-terminal corresponding to state  of the NFA.  Then
 of the NFA.  Then
 , the non-terminal
corresponding to the start state of the NFA
, the non-terminal
corresponding to the start state of the NFA 
 to state
 to state  on some symbol
`a', create a production rule of the form:
 on some symbol
`a', create a production rule of the form: 
 
 
 of the NFA which is a finish state, create a
production rule of the form:
 of the NFA which is a finish state, create a
production rule of the form:  
 
 
Note that  -transitions between states would generate
production rules of the form
-transitions between states would generate
production rules of the form 
 , which says
that ``wherever we see
, which says
that ``wherever we see  we can replace it with
 we can replace it with  '' - another
indication that
'' - another
indication that  -transitions denote equivalence.
-transitions denote equivalence. 
This process will work equally well with a DFA, and can be applied in
reverse to a regular grammar to produce the corresponding NFA.
 
 
 
 
 
 
 
