355 views
5 votes
5 votes
If $A$ is a regular language, $E$ a deterministic context-free language, $F$ a context-free language and for any language $L, L^c$ denotes its complement, which of the following statements is/are TRUE? (Mark all the appropriate choices)
  1. $E \cap F$ is context-free
  2. $A \cap E^c$ is deterministic context-free
  3. $E \cap F^c$ is context-free
  4. $A \cap F^c$ is context-free

1 Answer

Best answer
3 votes
3 votes
A is false. We can take two DCFLs $L_1 = \{a^nb^nc^m|n,m \geq 0\}$

$L_2 = \{a^mb^nc^n|n,m \geq 0\}$

Now, $L_1 \cap L_2 = \{a^nb^nc^n \mid n \geq 0\}$ is not a CFL.

B is true as DCFL set is closed under complement and intersection with a regular language.

CFLs are not closed under complement. So, C and D are false.

Reference: https://gatecse.in/closure-property-of-language-families/
selected by
Answer:

Related questions

7 votes
7 votes
1 answer
2