According the Peter Linz Book, am a confusing about the two example the Grammar G1 = ({S},{a,b},S,P1) with P1 given as
S -> abS|a
and G2 = ({S,S1,S2,},{a,b},S,P2)
S -> S1ab S1 -> S1ab|S2 S2 -> a
G1,G2 is regular..
i generated from G1 Language= {ababa,...} and it Regular expression (ab)a and from G2 = {aabab} is that right it regular expression a(ab) in the book it show its aab(ab)* but how
First, is it write regular expression ?? Why this G3 = ({S,A,B},{a,b},S,P) with Production
S -> A A -> aB | 'epsilon' B -> Ab
is not regular ? although its left or right linear prodcution.
second why G3 is not regular ?