Commit 072f7ab8 authored by Philip K.'s avatar Philip K. 🌝

Merge branch 'master' into 'master'

4 + 5 und Punkte für den Rest

See merge request !1
parents 03b866de 08a18f5c
\section{Automatenminimierung \hfill 6 Punkte}
Gegeben sei folgender Automat:
\begin{center}
\begin{tikzpicture}
\tikzstyle{vertex}=[circle,draw=black,minimum size=17pt,inner sep=0pt]
\tikzset{edge/.style = {->,> = latex'}}
\node[vertex] (q0) at (0,6) {$q_0$};
\node[vertex, accepting] (q1) at (0,0) {$q_1$};
\node[vertex, accepting] (q2) at (-2,4) {$q_2$};
\node[vertex, accepting] (q3) at (0,4) {$q_3$};
\node[vertex, accepting] (q4) at (3.5,3) {$q_4$};
\node[vertex, accepting] (q5) at (2,2) {$q_5$};
\node[vertex] (q6) at (0,2) {$q_6$};
\node[vertex, accepting] (q7) at (-2,2) {$q_7$};
\node[vertex, accepting] (q8) at (2,5) {$q_8$};
\node[vertex, accepting] (q9) at (-3.5,3) {$q_9$};
\path[edge] (q0) edge node [midway, above right] {0} (q8);
\path[edge] (q0) edge node [midway, above left] {1} (q2);
\path[edge] (q1) edge node [midway, below right] {0|1} (q5);
\path[edge] (q2) edge node [midway, above] {0} (q3);
\path[edge] (q2) edge node [midway, left] {1} (q7);
\path[edge] (q3) edge[bend left=20] node [midway, above right] {0} (q5);
\path[edge] (q3) edge node [midway, left] {1} (q0);
\path[edge] (q4) edge node [midway, above right] {0} (q8);
\path[edge] (q4) edge node [midway, above] {1} (q5);
\path[edge] (q5) edge[bend left=20] node [midway, above] {0} (q3);
\path[edge] (q5) edge node [midway, above] {1} (q6);
\path[edge] (q6) edge [loop below] node [midway, below] {0} (q6);
\path[edge] (q6) edge node [midway, left] {1} (q3);
\path[edge] (q7) edge node [midway, below] {0} (q1);
\path[edge] (q7) edge node [midway, above] {1} (q6);
\path[edge] (q8) edge node [midway, right] {0|1} (q5);
\path[edge] (q9) edge node [midway, above] {0} (q7);
\path[edge] (q9) edge node [midway, below] {1} (q2);
\end{tikzpicture}
\end{center}
Minimieren sie den Automaten und zeichnen sie den resultierenden minimalen Automaten.
\ No newline at end of file
\section{Korekursion und Koinduktion \hfill 8 Punkte}
\begin{multicols}{2}
\begin{verbatim}
codata S a where
hd: S a -> a
tl: S a -> S a
codata IT a where
node: IT a -> a
left: IT a -> IT a
right: IT a -> IT a
\end{verbatim}
\end{multicols}
\begin{multicols}{2}
\begin{verbatim}
hd (genl t) = node t
tl (genl t) = genl (left t)
hd (genr t) = node t
tl (genr t) = genl (right t)
hd (const x) = x
tl (const x) = const x
node (slant s) = hd s
left (slant s) = slant (tl s)
right (slant s) = slant s
\end{verbatim}
\end{multicols}
\begin{enumerate}
\item \marginpar{\textbf{5 Punkte}} Zeigen Sie, dass folgende Aussagen gelten:\\
\begin{verbatim}
genl (slant s) = s
genr (slant s) = const (hd s)
\end{verbatim}
\item \marginpar{\textbf{3 Punkte}} Definieren Sie eine korekursive Funktion \texttt{layers: S a -> IT a}, die einen Baum erzeugt, in dem das Wurzelelement den Wert des ersten Elements des Parameters hat. Die Kinder der Wurzel, den Wert des zweiten Elements. Die Kinder der Kinder den Wert des dritten Elements, usw.
\end{enumerate}
\ No newline at end of file
......@@ -11,6 +11,7 @@
\usepackage[shortlabels]{enumitem} %
\usepackage[per-mode=fraction,binary-units=true,exponent-product=\cdot]{siunitx}
\usepackage{amsmath} %
\usepackage{multicol}
\usepackage{tikz} %
\usetikzlibrary{arrows,automata,positioning,matrix} %
......
\section{Strukturelle Induktion und Folds \hfill 9 Punkte}
\begin{enumerate}
\item \marginpar{\textbf{6 Punkte}}
\item \marginpar{\textbf{3 Punkte}}
\end{enumerate}
\ No newline at end of file
\section{System-F \hfill 8 Punkte}
\begin{enumerate}
\item \marginpar{\textbf{2 Punkte}}
\item \marginpar{\textbf{5 Punkte}}
\item \marginpar{\textbf{1 Punkte}}
\end{enumerate}
\ No newline at end of file
\section{Polynomordnungen \hfill 9 Punkte}
\begin{enumerate}
\item \marginpar{\textbf{3 Punkte}}
\item \marginpar{\textbf{3 Punkte}}
\item \marginpar{\textbf{3 Punkte}}
\end{enumerate}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment