...
Question 5640 – Compiler-Design
May 17, 2024
Question 5768 – Compiler-Design
May 17, 2024
Question 5640 – Compiler-Design
May 17, 2024
Question 5768 – Compiler-Design
May 17, 2024

Question 5642 – Compiler-Design

The equivalent production rules corresponding to the production rules

S → Sα1 | Sα2 | β1 | β2 is

Correct Answer: D

Question 271 Explanation: 
Given grammar can generate { β1, β2 , β2α2, , β2 α1, , β1α2, , β1α1 , β1 α1α2………………}
Option A can generate only {β1, β2} so it is not a correct option.
Option B is not correct because it have no terminating point strings containing {α1 , α2}
Option C is not correct because it can generate only {β1, β2}
Option D is correct answer because it can generate all the strings generated by given grammar.
A
S → β1 | β2, A → α1A | α2A | λ
B
S → β1| β2 | β1A | β2A, A → α1A | α2A
C
S → β1 | β2, A → α1A | α2A
D
S → β1 | β2 | β1A | β2A, A → α1A | α2A | λ
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!