1,315 views
0 0 votes

If L1 is context free and L2 is not context free, then L1 ∩ L2 is context free.

Is this true or not?

2 Answers

0 0 votes
No..in worst case it will not be CFL..

L1 intersection L2= higher order language among two..
0 0 votes
take an example

L1= (a^n b^n | where n >=1  )   //CFL

L2=(a^n b^n c^n| where n >=1 )  // NCFL

there intersection are not CFL

BUT if

L1= (a^n b^n | where n >=0  )   //CFL

L2=(a^n b^n c^n| where n >=0 )  // NCFL

then there intersection will be empty language which is regular which is CFL

hence we may contradict here

 

BUT we always need do focus on worst case

so this statement is FALSE
Position:
Show:

Related questions

0 0 votes
0 0 answers
176
176 views
lambodar_pal asked Jul 27
176 views
The intersection of a context free language and a regular languagea)need not be regularb)need not be context freec) is always regulard) is always context free  
1 1 vote
0 0 answers
439
439 views
dazeeee asked Apr 3, 2024
439 views
Give a context-free grammar for each of the following languages. Consider, Σ={0,1}.A. The language of strings that start with 1B. The language of strings of the form WWR ...
1 1 vote
1 1 answer
739
739 views
practicalmetal asked Mar 20, 2023
739 views
The complement of the languages:i) {ww | w in (0+1)*}ii) {$a^n b^nc^n$ | n>1} area) Context Free b) Not Context Free c)are DCFL’s d)None