PANDURA
Consider the language L=(a*+b)*. Which of the following grammar depicts the language
L?
a) S → aS | S1E
b) S → AB | E, A →a, B → = b
c) S → ASBE, B bbB
d) None of the above
Answers
Answered by
39
Answer:
(c) S=> ASBE, B bbB..............
Answered by
1
Given grammar is
L=(a*+b)*.
This grammar generates strings of type (b, ab, bb, aab, abb, bbb, aaab} Here number of a's can be 0 but number of b's is always more than 0.
From this option 1) and 2) are eliminated because these can't generate number of a's as 0.
This grammar generates string of type (a b, aa, ab, bb, aaa, aab, abb, bbb This grammar doesn't generate null string number of a's and b's are more than 0 So only option 4) matches according to grammar G, and G
G generates language of type (S → ASBE, B bbB)
Hence, We get, the Correct option c) S → ASBE, B bbB
Similar questions
Hindi,
3 months ago
English,
3 months ago
Science,
3 months ago
Chemistry,
6 months ago
Social Sciences,
6 months ago
Business Studies,
10 months ago
Social Sciences,
10 months ago