adplus-dvertising
frame-decoration

Question

Which of the following is the correct representation of grammar for the given regular expression?
a(aUb)*b

a.

(1) S → aMb
(2) M → e
(3) M → aM
(4) M → bM

b.

(1) S → aMb
(2) M → Mab
(3) M → aM
(4) M → bM

c.

(1) S → aMb
(2) M → e
(3) M → aMb
(4) M → bMa

d.

None of the mentioned

Answer: (a).(1) S → aMb
(2) M → e
(3) M → aM
(4) M → bM

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following is the correct representation of grammar for the given regular expression? a(aUb)*b