Grammar for a^n

49 views Asked by At

Currently i am studying computation theory and i came up with this T - F question :

The following Grammar

S -> aS | Sa

produces the Language {a^n | n>=1}.

Well i do not know if we can say that, because this grammar does not halt. It just creates a bunch but it does accept nothing. It would surely be if we had an ε derivation rule.

It is exactly the same as having the following:

example of automata that does accept nothing

that never comes to a final state.

0

There are 0 answers