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|m≥n,n>0}
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
{ambn|m≥n,n≥0}
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
{ambn|m>n,n≥0}
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,n≥0} S→XY X→aX|a⇒X→{am|m≥1} Y→aYb|ϵ⇒Y→{anbn|n≥0} S→XY⇒S→{ambn|m>n,n≥0}
m > n because at least 1 will be attached on left of anbn.