705 views

2 Answers

Best answer
1 votes
1 votes

A regular grammar is either right linear or left linear.

Right Linear: If all the productions are of the form
S $\rightarrow$ aA
S $\rightarrow$ a

Where A $\in$ V (set of variable) and a $\in$ $\sum$ *

Left Linear: If all the production are of the form
S $\rightarrow$ Aa
S $\rightarrow$ a

Where A $\in$ V (set of variable) and a $\in$ $\sum$ *.

Note: If we have this kind of production in a grammar then it is neither the right linear nor the left linear. Hence it is not a regular grammar.
S $\rightarrow$ aA
S $\rightarrow$ Aa
S $\rightarrow$ a.

Where A $\in$ V (set of variable) and a $\in$ $\sum$ *.

selected by

Related questions

0 votes
0 votes
1 answer
1
1 votes
1 votes
1 answer
3
Abbas Ahmad asked Nov 30, 2018
412 views
If a grammar G is both left linear as well as right linear then,what should be the case a) G is always not regularb) G may or may not be regularc) something else
0 votes
0 votes
0 answers
4