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

Consider the following expression grammer 'G'.
AB|a| CBD
BC|b
CA|c
Dd

Which of the following grammer is non-left recursive but is equivalent to G?

A
AaA|bA|cA
AcBDA|BDA|ϵ
BC|b
CA|c
Dd
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
AaA|bA|cA|cBDA
ABDA|ϵ|BA
BC|b
C|c
Dd
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
AaA|bA|cA|cBDA
ABDA|ϵ
BC|b
CA|c
Dd
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
AaA|bA|cA|
ABDA|ϵ
BC|b
CA|c
Dd
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is C AaA|bA|cA|cBDA
ABDA|ϵ
BC|b
CA|c
Dd

Given grammer:
AB|a|CBD AA|a|ABD|c|b|cBD
BC|b BC|b
CA|c CA|c
Dd Dd

Removing left recurssion from AA|a|b|c|ABD|cBD

AaA|bA|cA|cBDA
ABDA|ϵ
BC|b
CA|c
Dd




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