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

Consider the following CFG.

SaSb |bSa| aS |bS|a

Which of the following string cannot be generated by given CFG?

A
aaba
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
aabbb
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
C
aaaab
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
aaabb
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is B aabbb
(A)aaabb:SaSbaaSbbaaabb

(B)aaba:SaSaaSaabSaaba

(C)aaaab:SaSbaaSbaaaSbaaaab

(D) aabbb cannot be drived using given grammar

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Language is a Pattern
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon