--- a/hws/hw03.tex Mon Sep 29 00:45:38 2014 +0100
+++ b/hws/hw03.tex Sun Oct 05 23:56:18 2014 +0100
@@ -1,8 +1,6 @@
\documentclass{article}
-\usepackage{charter}
-\usepackage{hyperref}
-\usepackage{amssymb}
-\usepackage{amsmath}
+\usepackage{../style}
+\usepackage{../graphics}
\begin{document}
@@ -31,20 +29,50 @@
$\textit{zeroable(r)} \;\text{if and only if}\; L(r) = \varnothing$
\end{center}
-\item Define the tokens and regular expressions for a language
- consisting of numbers, left-parenthesis $($,
- right-parenthesis $)$, identifiers and the operations $+$,
- $-$ and $*$. Can the following strings in this language
- be lexed?
+\item Given the alphabet $\{a,b\}$. Draw the automaton that has two states, say $q_0$ and $q_1$.
+The starting state is $q_0$ and the final state is $q_1$. The transition
+function is given by
+
+\begin{center}
+\begin{tabular}{l}
+$(q_0, a) \rightarrow q_0$\\
+$(q_0, b) \rightarrow q_1$\\
+$(q_1, b) \rightarrow q_1$
+\end{tabular}
+\end{center}
+
+What is the languages recognised by this automaton?
+
+\item Give a non-deterministic finite automaton that can recognise
+the language $L(a\cdot (a + b)^* \cdot c)$.
+
-\begin{itemize}
- \item $(a + 3) * b$
- \item $)()++ -33$
- \item $(a / 3) * 3$
-\end{itemize}
+\item Given the following deterministic finite automaton over the alphabet $\{0, 1\}$,
+find the corresponding minimal automaton. In case states can be merged,
+state clearly which states can
+be merged.
-In case they can, can you give the corresponding token
-sequences.
+\begin{center}
+\begin{tikzpicture}[scale=3, line width=0.7mm]
+ \node[state, initial] (q0) at ( 0,1) {$q_0$};
+ \node[state] (q1) at ( 1,1) {$q_1$};
+ \node[state, accepting] (q4) at ( 2,1) {$q_4$};
+ \node[state] (q2) at (0.5,0) {$q_2$};
+ \node[state] (q3) at (1.5,0) {$q_3$};
+ \path[->] (q0) edge node[above] {$0$} (q1)
+ (q0) edge node[right] {$1$} (q2)
+ (q1) edge node[above] {$0$} (q4)
+ (q1) edge node[right] {$1$} (q2)
+ (q2) edge node[above] {$0$} (q3)
+ (q2) edge [loop below] node {$1$} ()
+ (q3) edge node[left] {$0$} (q4)
+ (q3) edge [bend left=95, looseness = 2.2] node [left=2mm] {$1$} (q0)
+ (q4) edge [loop right] node {$0, 1$} ()
+ ;
+\end{tikzpicture}
+\end{center}
+
+\item Define the language $L(M)$ accepted by a deterministic finite automaton $M$.
\end{enumerate}