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

If G is a grammer with productions

SSaSaSbbSaSSϵ

where S is the start variable, then which one of the following strings is not generated by G?

Open in App
Solution

The given grammer is SSaSaSbbSaSSϵ

generates all strings with equal number of 'a' and 'b'

Now, SSaS can only generate strings where 'a' is more than 'b' since on left and right of 'a' in SaS, S will have only strings with na=nborna>nb.

So, option (d) "babba" which is a string with nb>na is not possible to generate by the given grammer.




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