FOR FREE YEAR SOLVED

Design a DFA for Language: “At most two ‘a’”

= {a, b}

 

Answer:

 

L = {λ, a, aa, aabb, abbb, …..}

 

 

Regular Expression = λ + a + b*aab* = b* + b*ab* + b*ab*ab*

 

Grammar:

S → bS | aA | λ

A → bA | aB | λ

B → bB | λ