retagged by
962 views

1 Answer

Best answer
2 votes
2 votes

Type-3 grammars must have a single non-terminal on the left-hand side and a right-hand side consisting of a  terminals or single terminal followed by a single non-terminal.

The productions must be in the form where y is single terminal and a
X → a or X → aY /// right linear
       or
X → a or X → Ya  /////left linear

any type 3 can be grammar can be written right linear form or left linear form but not with both at same time. if we r using left linear form  than all production in grammar should follow left linear form

now consider Example

S → X a  ////left linear
X → a
X → aX  ////right linear
X → abc
X → ε

this grammar utillised both left and right linear form at same time thatswhy not a type-3 grammar

now example of "ab" as a substring

S-->XabX

X-->XaX |   XbX

X-->∈

selected by

Related questions

0 votes
0 votes
1 answer
3
shekhar chauhan asked Jun 6, 2016
2,607 views
Regular grammars can only describe regular languages, why reverse is not true .What should be the most appropriate Reason ? Explain with in few Lines .If possible give an...
0 votes
0 votes
1 answer
4