..........................................NEXT PREVIOUS INDEX
 

 L04 FSA: NFSA Traversal


                    Traversing  NFSA

o  NFSA has choice points.  What to do? Which path to pursue?

o  Parallel traversal:  Make all possible choices (and store in
   possible current states).
    * After consuming an input symbol, take all possible arcs from
      all possible current states.
    * When string ends, if one of the current states is an accepting
      state, accept the string.

o  Backtracking traversal:  Follow one choice at a time, but return
   and follow another choice if necessary.
    - If there is a choice point, follow the next choice. (Keep 
      track of choice points and the choices made therein, using a
      stack.)
    - When string ends, and cur-state is an accepting state, return
      ACCEPT. 
    - Else go back to previous choice point undo the consumption of 
      string.
       - Make next choice (record new choice in stack)

o  Look-ahead:  Look ahead in the input to decide which path to take
..........................................NEXT PREVIOUS INDEX