\documentclass[11pt]{article}

\usepackage{exscale}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{latexsym}
\usepackage{times,mathptm}
\usepackage{epsfig}
\usepackage{amsmath}

\textwidth 6.5truein          
\textheight 9.0truein
\oddsidemargin 0.0in
\topmargin -0.8in

\parindent 0pt          
\parskip 0pt
%\def\baselinestretch{1.1}

\begin{document}

\begin{large}
\centerline {\bf Computer Science 423}
\centerline {\bf Fall 2024}
\centerline {\bf Homework 6}
\centerline{\bf My name and section}
%\end{large}
\vskip .5cm

%\begin{Large}
\bf Due: beginning of class, Thursday, 10/25/2024 \hfill Points: 50
\end{large}
\vskip 0.3cm
Answer the following questions and submit typeset solutions by the due date.  As stated on the syllabus, any collaborators or 
outside sources must be listed under the corresponding problem.  Further, your final submission must be completely your own work.
\begin{enumerate}

\item {[3 points each]}  For each statement below, state whether it is True or False.  No explanation necessary.
\begin{enumerate}
\item If a language $L$ can be recognized by a NFA, a CFG must exist to generate $L$.
\item If there are different derivations for the same string in a CFG for a context-free language, the grammar is ambiguous.
\item If language $B$ is a subset of a context-free language $A$, then $B$ must also be context-free.
\item If $A$ is a context-free language, then $A$ must be non-regular.
\item A context-free language cannot contain $\epsilon$.

\end{enumerate}

Collaborators:


\item {[23 points]} Use the pumping lemma for CFLs to prove that the following languages are not context-free.

\begin{enumerate}

\item {[3 points]} $L_1=\{0^n1^n0^n1^n\ |\ n\ge0\}$

\item {[5 points]} $L_2=\{0^n\ |\ n {\rm\ is\ prime}\}$

\item {[7 points]} $L_3=\{a^nb^nc^j |\ n \le j\}$.

\item {[8 points]} $L_4=\{t_1\#t_2\#\cdots \#t_k\ |\ k\ge2, {\rm\ each\ } t_i\in\{a, b\}^* {\rm\ and\ } t_i=t_j {\rm\ for\ some\ }i\not=j\}$
(Hint: Choose $s$ with one $\#$)

\end{enumerate}

Collaborators:

\item {[2 points each]} Determine whether or not the following languages are CFLs. Justification of your answers are helpful but not required.

\begin{enumerate}
\item $A=\{a^mb^na^mb^n\ |\ m,n\ge0\}$
\item $B=\{a^mb^na^nb^m\ |\ m,n\ge0\}$
\item $C=\{a^ib^jc^kd^l\ |\ i+j\le k+l\}$
\item $D=\{a^ib^jc^kd^l\ |\ i+l\le j+k\}$
\item $E=\{a^nww^Rb^n\ |\ n\ge0, w\in\{a, b\}^*\}$
\item $F=\{wa^nb^nw^R\ |\ n\ge0, w\in\{a, b\}^*\}$
\end{enumerate}

Collaborators:

\end{enumerate}

\end{document}
