summaryrefslogtreecommitdiff
path: root/Homework/cs5000/hw02/CS5000_F23_EH_HW02.tex
blob: f5780701f90d3630168aaf962ed095a9dd5a8da9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
% Created 2023-10-07 Sat 14:51
% Intended LaTeX compiler: pdflatex
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\notindent \notag  \usepackage{amsmath} \usepackage[a4paper,margin=1in,portrait]{geometry}
\author{Elizabeth Hunt}
\date{\today}
\title{HW 02}
\hypersetup{
 pdfauthor={Elizabeth Hunt},
 pdftitle={HW 02},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 28.2 (Org mode 9.7-pre)}, 
 pdflang={English}}
\begin{document}

\maketitle
\setlength\parindent{0pt}

\section{Problem 1}
\label{sec:org41ad199}
\subsection{Part 1}
\label{sec:orgabe730c}
\(L(M) = \{ x | x \in \{ a \}^{*} \} \cup \{ x | x \in \{ b \}^{*} \} \cup \{ x | x \in \{ c \}^{*} \}\)

\subsection{Part 2}
\label{sec:orgb60fdea}

\begin{center}
\includegraphics[width=300px]{./img/p01_02.png}
\end{center}

\(Q = {q_0, q_1, q_2, q_3}\)

\(\Sigma = {a, b, c}\)

\(F = {q_1, q_2, q_3}\)

\(\delta(q_0, a) = {q_1}, \delta(q_1, a) = {q_1}, \delta(q_0, b) = {q_2}, \delta(q_2, b) = {q_2}, \delta(q_0, c) = {q_3}, \delta(q_3, c) = c\)

\section{Problem 2}
\label{sec:org9cf81d0}
\subsection{Work}
\label{sec:org2daff9f}
\begin{center}
\begin{tabular}{lll}
subset & 0 & 1\\[0pt]
\{q\textsubscript{0}\} & \{q\textsubscript{0}, q\textsubscript{1}\} & \{q\textsubscript{1}\}\\[0pt]
\{q\textsubscript{1}\} & \{q\textsubscript{2}\} & \{q\textsubscript{2}\}\\[0pt]
\{q\textsubscript{2}\} & \{q\textsubscript{2}\} & \{q\textsubscript{2}\}\\[0pt]
\{q\textsubscript{0}, q\textsubscript{1}\} & \{q\textsubscript{0}, q\textsubscript{1}\} \(\cup\) \{q\textsubscript{2}\} & \{q\textsubscript{1}\} \(\cup\) \{q\textsubscript{2}\}\\[0pt]
\{q\textsubscript{0}, q\textsubscript{1}, q\textsubscript{2}\} & \{q\textsubscript{0}, q\textsubscript{1}\} \(\cup\) \{q\textsubscript{2}\} \(\cup\) \{q\textsubscript{2}\} & \{q\textsubscript{1}\} \(\cup\) \{q\textsubscript{2}\} \(\cup\) \{q\textsubscript{2}\}\\[0pt]
\{q\textsubscript{1}, q\textsubscript{2}\} & \{q\textsubscript{2}\} \(\cup\) \{q\textsubscript{2}\} & \{q\textsubscript{2}\} \(\cup\) \{q\textsubscript{2}\}\\[0pt]
\end{tabular}
\end{center}


\subsection{Solution}
\label{sec:org7701586}
\begin{center}
\includegraphics[width=300px]{./img/p02.png}
\end{center}

\(Q_D = \{q_0, q_1, q_2, q_3, q_4, q_5\}\)

\(\Sigma = \{0, 1\}\)

\(F_D = \{q_1, q_2, q_4, q_5\}\)

\(\delta_D(q_0, 0) = q_1\)

\(\delta_D(q_0, 1) = q_2\)

\(\delta_D(q_1, 0) = q_5\)

\(\delta_D(q_1, q) = q_4\)

\(\delta_D(q_2, 0) = \delta_D(q_2, 1) = q_3\)

\(\delta_D(q_3, 0) = \delta_D(q_3, 1) = q_3\)

\(\delta_D(q_4, 0) = \delta_D(q_4, 1) = q_4\)

\(\delta_D(q_5, 0) = q_5\)

\(\delta_D(q_5, 1} = q_4\)

\section{Problem 3}
\label{sec:orge1c9402}
See attached python
\end{document}