wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Consider the grammar with following productions.
S a α b | b α c | ab
S α S| b
S αbb |ab
S α bdb| bd
the above grammar is

Open in App
Solution

S aα b | b c | ab
S α S| b
S abb |ab
S α bdb| bd
Since the LHS of the production S α bdb| bd which is S α does not belong to variable set V,the grammar is not a CFG (type 2).However since in all the productions length of LHS length of RHS.the grammar is type 1 (CSG).

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Objective Session 3
OTHER
Watch in App
Join BYJU'S Learning Program
CrossIcon