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

Identify the unambiguous grammar.

A
None of these
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
EE+E | EE |id
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
S aS| Sb |ε
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
S | aSb |ε
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
Open in App
Solution

The correct option is D S | aSb |ε
(A) E E+E |EE| id is ambiguous grammar.

"id + id * id" has 2 Parse trees

(B)SaS| Sb |ε is ambiguous grammar.
"ab" has 2 Parse trees

(C)SaSb |ε is unambiguous grammer.
Every string in anbn has one Parse tree

flag
Suggest Corrections
thumbs-up
1
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Properties of Operators: Commutative Associative and Distributive
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon