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

Identify the language generated by the following grammar, where S is the start variable.
S XY
X aX | a
Y aYb | ϵ

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

The correct option is D {ambn | m>n,n0}
S XY
X aX | a X{am | m1}
Y aYb | ϵ Y{anbn | n0}
S XY S{ambn | m>n,n0}
m > n because at least 1 will be attached on left of anbn.

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