recategorized by
3,231 views
2 votes
2 votes

The context free grammar given by
$S \rightarrow XYX$
$X \rightarrow aX \mid bX \mid \lambda$
$Y \rightarrow bbb$
generates the language which is defined by regular expression:

  1. $(a+b)^*bbb$
  2. $abbb(a+b)^*$
  3. $(a+b)^*(bbb)(a+b)^*$
  4. $(a+b)(bbb)(a+b)^*$
recategorized by

1 Answer

3 votes
3 votes
looking at  X-> aX | bX | eps

we see that X  is generating (a+b)*

now simply replacing X by (a+b)*

and Y by bbb  in S-> XYX

we get (a+b)*bbb(a+b)*  option c
Answer:

Related questions

0 votes
0 votes
1 answer
2
2 votes
2 votes
4 answers
3