Open In App

GATE | GATE-CS-2005 | Question 55

Consider the languages:

L1 = {anbncm | n, m > 0} 
L2 = {anbmcm | n, m > 0} 

Which one of the following statements is FALSE?



(A)

L1 ∩ L2 is a context-free language



(B)

L1 U L2 is a context-free language

(C)

L1 and L2 are context-free language

(D)

L1 ∩ L2 is a context sensitive language


Answer: (A)
Explanation:

We can recognize strings of given language using one Stack. These given languages are context free, so also context sensitive. Because CFLs are closed under Union property, so union of given languages will also be Context free. But CFLs are not closed under Intersection property, so Intersection of two CFLs may not be CFL.
 
Given L1 and If L2 are two context free languages, their intersection L1 ∩ L2 is not context free because we cannot identify strings of resultant language with help of one Stack: L1 = { anbncm | n > 0 and m > 0 } and L2 = { ambncn | n > 0 and m > 0 } L3 = L1 ∩ L2 = { anbncn | n > 0 } is not context free. 
So, option (a) is false.

Quiz of this Question
Please comment below if you find anything wrong in the above post

Article Tags :