Automata

NFA for strings ends with 'a'

We will follow below steps to create NFA
L = {a, aba, aba, baba, aa, ...}

Follow the steps describing "how to create NFA":
  1. First like DFA cover the inputs in the start
  2. There is slight change than DFA, we will include the higer bound and then we will go ahead with the actual input
  3. Means we will go on state A for input 'a'/'b' and then also we will go to state B on input 'a'
  4. As the string ends with 'a' and then if anything comes up we are not worried as it is not DFA. So no output on last state

Testing

  1. We will take one string aaba
  2. First input is 'a', so from state A we will go to state A and state B
  3. Now we have to ways to check for next input 'a', so from state A on 'a' we will go to A and B again
  4. And from B on 'a' we will go state B itself
  5. From B on input 'b' we will go state B itself
  6. And check all the possible ways which will lead to final state