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

In the correct grammar above, what is the length of the derivation (number of steps starting from S) to generate the string al bm with lm?

A
l+m+2
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
max (l, m)+3
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
max (l, m)+2
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
l+m+3
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is C max (l, m)+2
If grammar generates an b0 or a0bn then the length is max (l, m) if it generates albm initially we include two extra derivation so the total length is max(l, m)+2.

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Algebraic Operations
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon