CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

In the context-free grammar below, S is the start symbol, a and b are terminals, and ϵ denotes the empty strings
SaSAb | ϵ
A bA | ϵ
The grammar generates the language

A
{ambn|m=n}
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
{ambn|mn}
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
C
((a+b)b)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
ab
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is B {ambn|mn}
AbA | ϵ
L(A) = b*
SaSAb | ϵ
Now, substituting A solution into this gives
SaSbb | ϵ
SaSb | aSbb | aSbbb...| ϵ
L(S) = {ambn | mn}

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Context-Free Grammars
OTHER
Watch in App
Join BYJU'S Learning Program
CrossIcon