retagged by
819 views
3 votes
3 votes

Consider languages L1 and L2 over {0,1} alphabet .

                                L2= { w | w contains some x as a substring and x belongs to L1 }

Which of the following must be true?
I. If L1 is regular, L2 is also regular.
II. If L1 is CFL, L2 is also CFL.
III. If L1 is recursive, L2 is also recursive

  1. I and II only
  2. I, II and III
  3. I and III only
  4. II and III only
retagged by

1 Answer

1 votes
1 votes

Take $L1 = \Sigma *$ and let $x = aaabbb$ which belongs to L1 

And let $L2 =\left \{ a^{n}b^{m} | n < m\right \}$ 

Hence, $aaabbbb$ belongs to L2 but $x$ is a substring of $aaabbbb$ which makes first statement false .


Let $L1 = a^n b* a* b^n$ and let $x = ab$ which belongs to L1

And Let $L2 = \left \{ a^n b^n c^m | n>m, n,m >=0 \right \}$ 

Hence, $ab$ belongs to L2 but $x$ is a substring of $ab$ which makes second statement also false .


Then how the answer is B).

Related questions

3 votes
3 votes
2 answers
3
Shreya Roy asked Nov 18, 2016
1,060 views
Let L = {xy | xwy L1, |x| = |w| = |y|}. Then L is(L1 is regular)(A). Regular(B). Non regular(C). May be regular(D). None