Question
Closure properties of CFLs. I mentioned in class that if L is a CFL and R is regular, then L cap R is a CFL.
Closure properties of CFLs. I mentioned in class that if L is a CFL and R is regular, then L \cap R is a CFL. What about L1 \cap L2 when both are CFLs, and what about other properties you might expect? For each of the following, let L1 and L2 be arbitrary CFLs and determine whether the given language MUST be a CFL ("YES"), or you can find a counterexample ("NO"), i.e., particular choices of CFLs L1 and L2 such that the language is not a CFL. For the YES's give a short justification involving the construction of a grammar/PDA from the given grammars/PDAs. For the NO's, use the CFL pumping lemma or known non-context-free languages to establish your counterexample. (a) L1 L2 (concatenation) (b) L1 \cap L2 (intersection) (c) L1 \cup L2 (union) (d) L1* (asterate) (By the way, the book gives an example showing ~L1 is not necessarily a CFL; not helpful for this problem but good to know.)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started