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

\title{\bf Exploring DFAs \\[2ex]
\rm\normalsize CS 311, Fall 2015}
\date{}
\author{}

\begin{document}
\maketitle

\paragraph{Exercise 1} Consider the DFA $M_1$ where:
\begin{align*}
    Q &= \{q_0, q_1, q_2, q_3\} \\
    \Sigma &= \{a,b\} \\
    F &= \{q_0, q_1\}
\end{align*}
The start state is $q_0$ and the transition function is:
\begin{center}
$\begin{tabu}{c || c | c | c | c}
    \centering
    \delta & q_0 & q_1 & q_2 & q_3 \\
    \hline \hline
    a & q_1 & q_1 & q_1 & q_3 \\
    b & q_3 & q_2 & q_2 & q_3
\end{tabu}$
\end{center}
\begin{enumerate}[a)]
    \item Draw a state diagram for the the DFA $M_1$. \\\\\\\\\\\\\\\\\\\\\\
    \item What is the language recognized by the DFA $M_1$, $L(M_1)$? \\\\\\
    \item Choose an $s \in L(M_1)$ and write down the path of that string through the machine.
Now do the same for a string $s' \notin L(M_1)$.
\end{enumerate}

\newpage
\paragraph{Exercise 2} Draw a state machine for a DFA that recognizes each of the following languages:
\begin{enumerate}[a)]
    \item $A = \{ w \;|\; w \mbox{ contain neither the substrings $01$ nor $10$} \}$, $\Sigma = \{0,1\}$ \\\\\\\\\\\\\\\\\\\\\\\\\\
    \item $B = \{ w \;|\; w = x\mbox{\bf bab}y, \mbox{ where } x,y \in \Sigma^*\}$, $\Sigma = \{a,b\}$ \\\\\\\\\\\\\\\\\\\\\\\\
    \item $C = \{ w \;|\; \mbox{every odd position in $w$ is a 2} \}$, $\Sigma = \{0,1,2\}$
\end{enumerate}

\end{document}
