in Theory of Computation recategorized by
3,168 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)^*$
in Theory of Computation recategorized by
3.2k views

1 comment

edited by
Its simple All string containing bbb as sub string .

(a+b)*(bbb)(a+b)*
4
4

1 Answer

2 votes
2 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