# Questions & Answers of Regular and Contex-Free Languages, Pumping Lemma

If G is a grammar with productions

$\style{font-family:'Times New Roman'}{S\rightarrow SaS\;\vert\;aSb\;\vert\;bSa\;\vert\;SS\;\vert\;\in}$

where S is the start variable, then which one of the following strings is not generated by G?

Consider the following languages over the alphabet $\style{font-family:'Times New Roman'}{\sum=\{a,b,c\}.}$

Let $\style{font-family:'Times New Roman'}{L_1=\{a^nb^nc^m\vert m,n\geq0\}\;and\;\;L_2=\{a^mb^nc^n\vert m,n\geq0\}.}$

Which of the following are context-free languages?

$\style{font-family:'Times New Roman'}{\begin{array}{l}\mathrm I.\;\;\;\;{\mathrm L}_1\cup\;{\mathrm L}_2\\\mathrm{II}.\;\;{\mathrm L}_1\cap\;{\mathrm L}_2\end{array}}$

Which one of the following regular expressions represents the language: the set of all binary strings having two consecutive 0s and two consecutive 1s?

Language L1 is defined by the grammar:

Language L2 is defined by the grammar:

Consider the following statements:

P: L1 is regular

Q: L2 is regular

Which one of the following is TRUE?

III.${L}_{1}^{*}\cap {L}_{2}$ is context-free
IV.${L}_{1}\cup \overline{{L}_{2}}$ is context-free