435 views

3 Answers

Best answer
1 votes
1 votes
$L = \begin{Bmatrix} abbabb, abbaababb, abbaabaababb,.............. \end{Bmatrix}$

 

$L = \begin{Bmatrix} abba(aba)^*bb \end{Bmatrix}$

 

$Left \ Linear \ Grammer :$

 

$S\rightarrow Abb$

$A\rightarrow Aaba/C$

$C\rightarrow abba$
selected by
0 votes
0 votes
A $Left Linear$ grammar is a grammar which has at most one non-terminal on right side and is left recursive.

Now considering the set of strings generated by the given grammar:

$ \{ abbabb,abbaababb,.....\} $

By carefully observing the pattern , we notice that the strings always begin with $ab$ and end with $babb$. Using this information We can easily arrive at the grammar:

$S \rightarrow Ababb$

$A \rightarrow ab|Abaa$

No related questions found