\documentclass[11pt]{article}
\usepackage{amsmath,amssymb,amsthm}
%\usepackage[margin=1in]{geometry}
\newcommand{\encode}[1]{\langle #1 \rangle}

\title{\bf Assignment 2 \\[2ex]
\rm\normalsize CS 581 \\ Due October 11, 2018}
\date{}
\author{}

\begin{document}
\maketitle

\paragraph{Problem 1 [10 point]}
Give a Context-free grammar for the {\bf complement} of the following language:
\[ \{ a^nb^n\;|\; n \geq 0  \}  \]
(Note that while the class of Context-free languages is not closed under complement, this particular
language is Context-free)

\paragraph{Problem 2 [10 point]}
If $A$ and $B$ are languages, define $A \diamond B = \{ xy \;|\; x \in A \text{ and } y \in B \text{ and } |x| = |y|\}$.
Prove that if $A$ and $B$ are Regular languages then $A \diamond B$ is a Context-Free language.

\paragraph{Probem 3 [10 point]}
Prove or disprove. The class of Context-Free languages is closed under the {\em{\bf perfect shuffle}}
operation defined in assignment 1.

\end{document}
