197 views
0 votes
0 votes
Is it possible to write a Left Linear grammar for a given language directly, or we first write its Right linear grammar and then convert it subsequently? Please explain with some example.

1 Answer

0 votes
0 votes
Yes, Of Course, It is possible to write a Left Linear grammar for a given Regular language directly If the language is Simple and You have idea of How the Grammar would look like. For instance, Let $\Sigma = \left \{ a,b \right \}$ and Language is $L = \Sigma^*$

then You can directly write a Left linear Grammar for it as follows :

$S\rightarrow Sa\mid Sb\mid \epsilon$

But the language is Not always this Simple and in that case Writing Left linear Grammar directly takes a lot of Practice and Intuition etc, That's Why we first build FA for the language and then convert it into Right Linear Grammar and then into Left linear Grammar.

Related questions

2 votes
2 votes
1 answer
1
1 votes
1 votes
1 answer
2
meghna asked Apr 12, 2018
644 views
Which of the following are true for all regular languages and all homomorphisms, Justify with examples.
0 votes
0 votes
0 answers
4