CREATE OWN LIBRARY

Design a DFA for Language: "Ending with ‘a’"

∑ = {a, b}

 

Answer:

 

First, we write some string accepted by this machine L = {a, ba, baa, bbaa, ….} and design the corresponding machine:

 

 

Regular Expression: L = (a + b)* a

 

Grammar of the machine:

S → bS | aA

A → aA | bS | λ