I need help to construct a right-linear grammar for the language {w ∈ {a,b}* | w does not end in aa}.
I have constructed the regular grammar for the language {w ∈ {a,b}* | w does not end in aa}, as below
S -> aA | bB | ε
A -> aC | bB | ε
B -> aA | bB | ε
C -> aC | bB
How can I construct a right-linear grammar for the same?