\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 4}
\centerline{\bf My name}
%\end{large}
\vskip .5cm

%\begin{Large}
\bf Due: beginning of class, Thursday, 10/3/2024
\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.
Note: Draw state diagrams with no crossing arcs.
\begin{enumerate}


\item {[3 points each]}  For each statement below, state whether it is True or False.  No explanation necessary.
\begin{enumerate}
\item A DFA must have different start and accept states if it is to be converted to  a GNFA.
\item A GNFA can produce a different regular expression for the same DFA if the states are ripped in a different order.
\item When converting a DFA to a GNFA, $R2$ is $\epsilon$ if no self loop exists for $q_{rip}$.
\item A language is guaranteed to be regular if it passes the pumping lemma test.
\item For a language to fail the pumping lemma test, no string $s$ in the language can have a valid $xy^iz$ assignment that is valid for all $i$.

\end{enumerate}

Collaborators:

\item {[10 points each]} For each of the DFAs given below,

\begin{enumerate}
\item[i.] Draw the DFA given by the transition table.
\item[ii.] Convert the DFA to a regular expression using a GNFA.  Rip the states in reverse numerical (subscript) order and show the GNFA after each state is ripped.
\item[iii.] Provide a description of the language.
\end{enumerate}

\begin{enumerate}

\item
\begin{tabular}{r||c|c|c}
& $a$ & $b$ \\\hline\hline
$\rightarrow *q_1$ & $q_2$  & $q_1$\\\hline
$q_2$ & $q_1$ & $q_1$\\\hline
\end{tabular}

\vskip 0.3cm

\item
\begin{tabular}{r||c|c|c}
& $0$ & $1$ \\\hline\hline
$\rightarrow *q_1$ & $q_1$  & $q_2$\\\hline
$q_2$ & $q_3$ & $q_2$\\\hline
$q_3$ & $q_1$ & $q_2$\\\hline
\end{tabular}

\end{enumerate}

Collaborators:


\item {[7 points]} Let $C=\{1^kw\ |\ w\in\{0,1\}^*{\rm\ and\ }w{\rm\ contains\ at\ most\ }k{\rm\ 1s,\ for\ any\ }k\ge1\}$. Prove by the pumping lemma that $C$ is non-regular.

Collaborators:

\item {[8 points]} Prove by the pumping lemma that $B=\{vgv\ |\ v, g\in\{0,1\}^+\}$ is not regular. Note that $\{0,1\}^+=\{0,1\}^*-\epsilon$.
(Hint: Select $s=0^p10^p$.)


Collaborators:

\end{enumerate}

\end{document}
