S -> AaB
A -> aC | $\epsilon$
B -> aB | bB | $\epsilon$
C -> aCb | $\epsilon$
Is the regular expression for the above is this:
a(a + b)* a ( a* + b* )* ?
a(a + b)* a ( a* + b* )*
I think it is (a(anbn)+ epsilon) a(a+b)* for n>=0
@joshi_nitish Yes, you are right.
Regular Grammar always generate Regular Language. However, Non-Regular Language may or may not generate Regular Language. In this case a non-regular grammar is generating a regular language.
From the grammar, it is clear that the expression that can be generated is of the form (a(anbn)+ ϵ)a(a+b)* . But I am not able to understand how is it equivalent to a(a+b)*?
First of all, congratulations!
Please elucidate this really important...