25/36
\begin{frame}{Exercise: DFA Minimisation}
\begin{exampleblock}{}
\begin{center}
\input{tikz/dfa2.tex}
\end{center}\vspace{-2ex}
\begin{enumerate}
\item [2.] Final partitioning: $\{\, \{\, q_0 \,\}, \{\, q_1, q_2 \,\}, \{\, q_3 \,\}, \{\, q_4 \,\} \,\}$.
\pause
\item [3.] Reading off the minimal DFA:
\begin{center}
\begin{tikzpicture}[default,node distance=20mm,->]
\node (q0) [state] {$\{q_0\}$}; \draw ($(q0) + (-10mm,0mm)$) -- (q0);
\node (q2) [right of=q0] {};
\node (q4) [fstate,right of=q2] {$\{q_4\}$};
\begin{scope}[node distance=15mm]
\node (q1) [state,above of=q2,node distance=10mm] {$\{q_1,q_2\}$};
\node (q3) [state,below of=q2,node distance=10mm] {$\{q_3\}$};
\end{scope}

\draw (q0) to node [label,above left] {$a$} (q1);
\draw (q0) to[bend left=10] node [label,above right] {$b$} (q3);
\draw (q1) to[bloop] node [label,below] {$a$} (q1);
\draw (q1) to node [label,above right] {$b$} (q4);
\draw (q3) to[bend left=10] node [label,below left] {$a$} (q0);
\draw (q3) to[bend left=10] node [label,above left] {$b$} (q4);
\draw (q4) to[bend left=10] node [label,below right] {$a$} (q3);
\draw (q4) to[rloop] node [label,right] {$b$} (q4);
\end{tikzpicture}
\end{center}
\end{enumerate}
\end{exampleblock}
\vspace{10cm}
\end{frame}