Definition:
or
or
For every left linear grammar there exist an equivalent right linear and vice versa.
or we can also say,
A grammar said to be a regular grammar iff there exist a machine DFA / NFA such that
L(M) = L(G) (Language of machine = Language of grammar)
Here and are trap state.
Difference between trap state and dead state:
Trap state means we reach there but we can’t further go to any other state, we are trapped.
Here dead state. Dead state means we never reach that state i.e. unreachable state.
Language of the machine does not participate trap or dead state.
So, the language of both automata is: a(a + b)*