850 views
2 votes
2 votes

According to the definition - "A grammar is regular if it is either left linear or right linear."

Now, "Set of all strings over {a, b} starting with an 'a' and ending with a 'b'" represents a regular language.

Regular Expression - a(a+b)*b

It's grammar is given by - 

S -> aAb

A -> aA/bA/$\epsilon$

Here, A is right linear, but what about S?

This grammar is regular, but I can' realize if S is right linear. What does this mean?

Is the grammar not regular? (I don't think that's possible as the language is regular)

Or, are there any exceptions in rules of regular grammar?

Please explain. Thanks!

Please log in or register to answer this question.

Related questions

0 votes
0 votes
1 answer
1
saurabh rai asked Mar 27, 2018
375 views
What will be regular grammar for given regular expression$r=(ab^*+b)^*ab$
0 votes
0 votes
1 answer
4