diff options
Diffstat (limited to 'ws2015/eip')
-rw-r--r-- | ws2015/eip/blaetter/05/H5-2.md | 54 | ||||
-rw-r--r-- | ws2015/eip/blaetter/05/manifest | 1 |
2 files changed, 55 insertions, 0 deletions
diff --git a/ws2015/eip/blaetter/05/H5-2.md b/ws2015/eip/blaetter/05/H5-2.md new file mode 100644 index 0000000..aecba04 --- /dev/null +++ b/ws2015/eip/blaetter/05/H5-2.md | |||
@@ -0,0 +1,54 @@ | |||
1 | --- | ||
2 | header-includes: | ||
3 | - \usepackage{tikz} | ||
4 | - \usetikzlibrary{automata,positioning} | ||
5 | - \usepackage{enumitem} | ||
6 | - \usepackage[ngerman]{babel} | ||
7 | --- | ||
8 | |||
9 | # TCS-Kaffeeautomat | ||
10 | |||
11 | a) | ||
12 | |||
13 | | | $k$ | $e$ | $w$ | $b$ | | ||
14 | |------------------+------------+------------+------------+------------| | ||
15 | | Leer ($E$) | Fehler | Fehler | Nur Wasser | Nur Bohnen | | ||
16 | | Nur Bohnen ($B$) | Fehler | Leer | Voll | Nur Bohnen | | ||
17 | | Nur Wasser ($W$) | Leer | Fehler | Nur Wasser | Voll | | ||
18 | | Voll ($F$) | Nur Bohnen | Nur Wasser | Voll | Voll | | ||
19 | | Fehler ($\bot$) | Fehler | Fehler | Fehler | Fehler | | ||
20 | |||
21 | : $\delta$ \label{tbl:delta} | ||
22 | |||
23 | b) | ||
24 | |||
25 | \begin{figure}[!h] | ||
26 | \centering | ||
27 | \begin{tikzpicture}[shorten >=1pt, node distance=4cm, on grid, auto] | ||
28 | \node[state,initial,accepting] (voll) {$F$}; | ||
29 | \node[state] (fehler) [below=of voll] {$\bot$}; | ||
30 | \node[state,accepting] (bohnen) [left=of fehler] {$B$}; | ||
31 | \node[state] (wasser) [right=of fehler] {$W$}; | ||
32 | \node[state] (leer) [below=of fehler] {$E$}; | ||
33 | |||
34 | \path[->] | ||
35 | (voll.-140) edge node [above,sloped] {$k$} (bohnen.50) | ||
36 | (voll.-40) edge node [above,sloped] {$e$} (wasser.130) | ||
37 | (voll) edge [loop above] node {$w$, $b$} () | ||
38 | (fehler) edge [loop above] node {$k$, $e$, $b$, $w$} () | ||
39 | (bohnen.-35) edge node [above,sloped] {$e$} (leer.130) | ||
40 | (bohnen.35) edge node [below,sloped] {$w$} (voll.-130) | ||
41 | (bohnen) edge node {$k$} (fehler) | ||
42 | edge [loop left] node {$b$} () | ||
43 | (wasser.-140) edge node [above,sloped] {$k$} (leer.50) | ||
44 | (wasser.140) edge node [below,sloped] {$b$} (voll.-50) | ||
45 | (wasser) edge node [above] {$e$} (fehler) | ||
46 | edge [loop right] node {$w$} () | ||
47 | (leer) edge node {$e$, $k$} (fehler) | ||
48 | (leer.40) edge node [below,sloped] {$w$} (wasser.-130) | ||
49 | (leer.140) edge node [below,sloped] {$b$} (bohnen.-50); | ||
50 | \end{tikzpicture} | ||
51 | \caption{Kaffeeautomat} | ||
52 | \end{figure} | ||
53 | |||
54 | c) $(\{k, e, b, w\}, \{\bot, E, W, B, F\}, \delta, F, \{B, F\})$ mit $\delta$ wie in Tabelle \ref{tbl:delta}. | ||
diff --git a/ws2015/eip/blaetter/05/manifest b/ws2015/eip/blaetter/05/manifest new file mode 100644 index 0000000..0573ab5 --- /dev/null +++ b/ws2015/eip/blaetter/05/manifest | |||
@@ -0,0 +1 @@ | |||
H5-2.pdf \ No newline at end of file | |||