%
% Assignment 1g for CS3530 Computational Theory:
% Regular Languages
% Fall 2024
%
% Problems taken from Sipser
%

\documentclass{article}

\usepackage[margin=1in]{geometry}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{ae,aecompl}
\usepackage{emp,ifpdf}
\usepackage{graphicx}
\usepackage{enumerate}

\ifpdf\DeclareGraphicsRule{*}{mps}{*}{}\fi

\empaddtoTeX{\usepackage{amsmath}}
\empprelude{input boxes; input theory}

% skip for paragraphs, don't indent
\parskip 6pt plus 1pt
\parindent=0pt
\raggedbottom
\newenvironment{indentlist}{\begin{list}{}{\addtolength{\itemsep}{0.5\baselineskip}}}{\end{list}}

\begin{document}
\begin{empfile}

\begin{center}
\textbf{\Large CS 3530: Assignment 1g} \\[2mm]
Fall 2024
\end{center}

\raggedright

\section*{Problem 1.33 (10 points)}

\subsection*{Problem}

\newcommand{\col}[2]{\genfrac{[}{]}{0pt}{}{\,#1\,}{\,#2\,}}
Let
$$ \Sigma_2=\left\{\col{0}{0},\col{0}{1},\col{1}{0},\col{1}{1}\right\}. $$
Here, $\Sigma_2$ contains all columns of $0$s and $1$s of height
two. A string of symbols in $\Sigma_2$ gives two rows of $0$s and
$1$s. Consider each row to be a binary number and let
$$ C=\{w\in\Sigma_2^*:\text{ the bottom row of }w\text{ is three times the top row}\}$$
For example, $\col{0}{0}\col{0}{1}\col{1}{1}\col{0}{0}\in C$, but
$\col{0}{1}\col{0}{1}\col{1}{1}\notin C$. Show that $C$ is regular.
(You may assume the result claimed in Problem~1.31.)

\subsection*{Solution}

% Note: to draw the [0,1] columns in a diagram, use this:
%
%   picture oo, ol, lo, ll;
%   oo = btex $\genfrac{[}{]}{0pt}{}{\,0\,}{\,0\,}$ etex;
%   ol = btex $\genfrac{[}{]}{0pt}{}{\,0\,}{\,1\,}$ etex;
%   lo = btex $\genfrac{[}{]}{0pt}{}{\,1\,}{\,0\,}$ etex;
%   ll = btex $\genfrac{[}{]}{0pt}{}{\,1\,}{\,1\,}$ etex;
%
% Then you can use these as regular labels, e.g.:
%
%   edge(q0,q1,curve,ol);
%
% (0 and 1 are not legal variable names, so I used o and l instead)

\section*{Problem 1.47 (10 points)}

\subsection*{Problem}

Let $\Sigma=\{1,\#\}$ and let

$$ Y=\{w:w=x_1\#x_2\#\cdots\#x_k\text{ for }k\geq0\text{, each }x_i\in1^*\text{, and }x_i\neq x_j\text{ for }i\neq j\} $$

Prove that $Y$ is not regular.

\subsection*{Solution}

\end{empfile}
\immediate\write18{mpost -tex=latex \jobname}
\end{document}
