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

Which of the following statements are true?
1. Every left-recursive grammar can be converted to a right-recursive grammar and vice-versa.
2. All ε-productions can be removed from any context-free grammar by suitable transformations.
3. The language generated by a context-free grammar all of whose productions are of the form X w or X wY (where, w is a string of terminals and Y is a non-terminal), is always regular.
4. The derivations trees of strings generated by a context-free grammar in Chomsky Normal Form are always binary trees.

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

The correct option is D 1,3 and 4 only
1. True
2. All ε-productions can be removed from only context free grammars that produce λ-free CFL's.
If λϵL(G), then all ε-productions cannot be successfully removed. So 2 is false.
3. True
4. True, since in Chomsky normal form, every production is of the form of A BC or A a.
An example of a binary tree generated by CNF derivation is shown below:

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