143 views

Let L be the language of all strings on [0,1] ending with 1.

Let X be the language generated by the grammar G.

$S \rightarrow 0S/1A/ \epsilon$

$A \rightarrow 1S/0A$

Then $L \cup X=$

1. ∑*
2. L
3. X

Ans given : B. ∑*

They said that X is a language which contains all strings that do not end with 1. But is it so?

Can’t we generate 11 from the grammar?

edited | 143 views
0

They said that L is a language which contains all strings that do not end with 1.

Not X

0

@Registered user 48

Yes sorry..will edit that :P

0
I thought the question itself was given like that and you interpreted it wrong :p
0

@Registered user 48

Oh it was right before only.. I suddenly got confused. See their solution..

They said that L(X) = not ending with 1. But 11 is a valid string.