retagged by
767 views
2 votes
2 votes

If $L1$ is CFL and $L2$ is regular language which of the following is false?

  1. $L1-L2$ is not Context free
  2. $L1$ intersection $L2$ is Context free
  3. $\sim L1$ is Context free
  4. Both (A) and (C)
retagged by

3 Answers

2 votes
2 votes
L1 = {$a^nb^n, n >=0$}, L2 =$ (a+b)^*$, L2' = { }

 

A. $L1 - L2 = L1 ⋂ L2'$

$L1 ⋂ L2' = ${ }

Which is CFL. So A is false as it can can be CFL.

B. Intersection of CFL and RL is CFL always. So B is correct.

C. CFL isn't closed under complement. So C is false.

So D is correct.
0 votes
0 votes

Property of CFL 

  1. Not closed under intersection 
  2. Not closed under complement
  3. If intersected with Regular it is closed.

Now A – B is equal to  A ∩ B’ 

and complement of regular is regular 

Looking at all these cases answer is D 

0 votes
0 votes
Option c) is correct as CFL’s are not closed under complementation.
Answer:

Related questions

2 votes
2 votes
3 answers
2
2 votes
2 votes
2 answers
3
admin asked Mar 31, 2020
1,524 views
Given two DFA's $M1$ and $M2$. They are equivalent if$M1$ and $M2$ has the same number of states$M1$ and $M2$ accepts the same language i.e $L(M1)=L(M2)$$M1$ and $M2$ has...
3 votes
3 votes
2 answers
4
admin asked Mar 31, 2020
1,123 views
$(00+01+10)(0+1)^*$ representsStrings not starting with $11$Strings of odd lengthStrings starting with $00$Strings of even length