3,216 views
2 2 votes
If any grammer is given, how can we tell that the grammar is regular or not? Is that any perticular method?

2 Answers

2 2 votes

Regular Grammar -:Type 3 Grammar and is of the form 

             $1.S\rightarrow aA\,$

            $1.S\rightarrow Aa\,$

Where $A,S \, \epsilon $ $Non\:Terminal$,

$a\epsilon\: Terminal$, But  NOT the combination of both.

eg-:

consider Production

$S\rightarrow aA$(right Linear/Regular Grammar)

$A\rightarrow Ab$(left Linear/Regular Grammar)

$A\rightarrow\varepsilon$

is not a regular grammar as it contains both Left and Right linear Grammar.

0 0 votes

there simple point to check wether the grammar is regular or not 

first point . If given grammar contain two or more than two non terminal  in the right hand side of production than the grammar will not  regular grammar 

second point. a regular language can have more than one grammar which can be regular or not regular 

take an example of regular language (a+b)(a+b)+

and grammar

S->AA

A->aA | bA | a | b 

here the language is regular but the grammar is not regular 

but you can generate at least one regular grammar for this language 

conclusion we can generate at least one regular grammar for every regular language 

third point . If grammar has production which  is either left linear or right linear but not both the the grammar is a regular grammar 
• edited by
Position:
Show:

Related questions

3 3 votes
1 answers 1 answer
1.7k
1.7k views
2 2 votes
1 answers 1 answer
911
911 views
learner_geek asked Aug 8, 2017
911 views
As given that 1st is not regular and 2nd is regular as 1st not form AP but 2nd form.but if in 2nd we fix value of m and n same then it will work as 1st(not regular) so 2n...
2 2 votes
1 answers 1 answer
898
898 views
learner_geek asked Aug 8, 2017
898 views
Please mention reason with answer:-
0 0 votes
0 0 answers
1.0k
1.0k views
susgir2 asked Jan 2, 2019
1,015 views
Let R be the relation on the set ‘N’ of strictly positive integers, where strictly positive integers x and y satisfy x R y iffx^2 – y^2 = 2^kfor some non-negative integer...