tricky_minimal_assignment_1.tex 6.16 KB
Newer Older
Jaime Arias's avatar
Jaime Arias committed
1
2
3
4
5
6
7
8
9
10
11
\documentclass{standalone}
\usepackage[dvipsnames,svgnames,table]{xcolor}
\usepackage{tikz}
\usetikzlibrary{automata, positioning, arrows, shapes, shapes.gates.logic, shapes.gates.logic.US}
\begin{document}
\begin{tikzpicture}[node distance=1.8cm]
  \tikzstyle{SEQ}=[diamond]
  \tikzstyle{NULL}=[trapezium, trapezium left angle=120, trapezium right angle=120, minimum size=8mm]
  \tikzstyle{AND}=[and gate US, rotate=90 ]
  \tikzstyle{OR}=[or gate US, rotate=90 ]
  \tikzset{every node/.style={ultra thick, draw=red, minimum size=6mm}}
Jaime Arias's avatar
Jaime Arias committed
12
13
14
15
16
17
18
19
20
21
22
23
24
  \node[draw=red, SEQ, xshift=0.000000cm ] (a_1) {\ensuremath{\mathtt{a_{1}}}};
  \node[draw=none, blue, xshift=2mm, yshift=7mm] at (a_1.east) {\small{\ensuremath{\mathtt{level}}}};
  \node[draw=none, green!60!black, xshift=-2mm, yshift=7mm] at (a_1.west) {\small{\ensuremath{\mathtt{depth}}}};
  \node[draw=none, blue, xshift=2mm, yshift=0mm] at (a_1.east) {\small{\ensuremath{\mathtt{0}}}};
  \node[draw=none, green!60!black, xshift=-2mm, yshift=0mm] at (a_1.west) {\small{\ensuremath{\mathtt{5}}}};
  \node[draw=red, AND, logic gate inputs=nn, xshift=-0.000000cm , yshift=4mm, below = 1.4cm of a_1.south] (a') {\rotatebox {-90}{\ensuremath{\mathtt{a'}}}};
  \node[draw=none, blue, xshift=2mm, yshift=0mm] at (a'.south) {\small{\ensuremath{\mathtt{1}}}};
  \node[draw=none, green!60!black, xshift=-2mm, yshift=0mm] at (a'.north) {\small{\ensuremath{\mathtt{4}}}};
  \draw[solid] (a_1) edge (a'.east);
  \node[draw=red, SEQ, xshift=-1.250000cm , below of=a'] (b_1) {\ensuremath{\mathtt{b_{1}}}};
  \node[draw=none, blue, xshift=2mm, yshift=0mm] at (b_1.east) {\small{\ensuremath{\mathtt{1}}}};
  \node[draw=none, green!60!black, xshift=-2mm, yshift=0mm] at (b_1.west) {\small{\ensuremath{\mathtt{4}}}};
  \draw[solid] (a'.input 1) edge (b_1);
Jaime Arias's avatar
Jaime Arias committed
25
  \node[draw=red, SEQ, xshift=1.250000cm , below of=a'] (c_1) {\ensuremath{\mathtt{c_{1}}}};
Jaime Arias's avatar
Jaime Arias committed
26
27
28
  \node[draw=none, blue, xshift=2mm, yshift=0mm] at (c_1.east) {\small{\ensuremath{\mathtt{1}}}};
  \node[draw=none, green!60!black, xshift=-2mm, yshift=0mm] at (c_1.west) {\small{\ensuremath{\mathtt{2}}}};
  \draw[solid] (a'.input 2) edge (c_1);
Jaime Arias's avatar
Jaime Arias committed
29
  \node[draw=red, AND, logic gate inputs=nn, xshift=-0.000000cm , yshift=4mm, below = 1.4cm of c_1.south] (c') {\rotatebox {-90}{\ensuremath{\mathtt{c'}}}};
Jaime Arias's avatar
Jaime Arias committed
30
31
32
  \node[draw=none, blue, xshift=2mm, yshift=0mm] at (c'.south) {\small{\ensuremath{\mathtt{2}}}};
  \node[draw=none, green!60!black, xshift=-2mm, yshift=0mm] at (c'.north) {\small{\ensuremath{\mathtt{1}}}};
  \draw[solid] (c_1) edge (c'.east);
Jaime Arias's avatar
Jaime Arias committed
33
  \node[draw=red, SEQ, xshift=-1.250000cm , below of=c'] (f_1) {\ensuremath{\mathtt{f_{1}}}};
Jaime Arias's avatar
Jaime Arias committed
34
35
36
  \node[draw=none, blue, xshift=2mm, yshift=0mm] at (f_1.east) {\small{\ensuremath{\mathtt{2}}}};
  \node[draw=none, green!60!black, xshift=-2mm, yshift=0mm] at (f_1.west) {\small{\ensuremath{\mathtt{1}}}};
  \draw[solid] (c'.input 1) edge (f_1);
Jaime Arias's avatar
Jaime Arias committed
37
  \node[draw=red, SEQ, xshift=1.250000cm , below of=c'] (g_1) {\ensuremath{\mathtt{g_{1}}}};
Jaime Arias's avatar
Jaime Arias committed
38
39
40
  \node[draw=none, blue, xshift=2mm, yshift=0mm] at (g_1.east) {\small{\ensuremath{\mathtt{2}}}};
  \node[draw=none, green!60!black, xshift=-2mm, yshift=0mm] at (g_1.west) {\small{\ensuremath{\mathtt{1}}}};
  \draw[solid] (c'.input 2) edge (g_1);
Jaime Arias's avatar
Jaime Arias committed
41
  \node[draw=red, state, xshift=-0.000000cm , below of=g_1] (g') {\ensuremath{\mathtt{g'}}};
Jaime Arias's avatar
Jaime Arias committed
42
43
44
  \node[draw=none, blue, xshift=2mm, yshift=0mm] at (g'.east) {\small{\ensuremath{\mathtt{3}}}};
  \node[draw=none, green!60!black, xshift=-2mm, yshift=0mm] at (g'.west) {\small{\ensuremath{\mathtt{0}}}};
  \draw[solid] (g_1) edge (g');
Jaime Arias's avatar
Jaime Arias committed
45
  \node[draw=red, state, xshift=-0.000000cm , below of=f_1] (f') {\ensuremath{\mathtt{f'}}};
Jaime Arias's avatar
Jaime Arias committed
46
47
48
  \node[draw=none, blue, xshift=2mm, yshift=0mm] at (f'.east) {\small{\ensuremath{\mathtt{3}}}};
  \node[draw=none, green!60!black, xshift=-2mm, yshift=0mm] at (f'.west) {\small{\ensuremath{\mathtt{0}}}};
  \draw[solid] (f_1) edge (f');
Jaime Arias's avatar
Jaime Arias committed
49
  \node[draw=red, AND, logic gate inputs=nn, xshift=-0.000000cm , yshift=4mm, below = 1.4cm of b_1.south] (b') {\rotatebox {-90}{\ensuremath{\mathtt{b'}}}};
Jaime Arias's avatar
Jaime Arias committed
50
51
52
  \node[draw=none, blue, xshift=2mm, yshift=0mm] at (b'.south) {\small{\ensuremath{\mathtt{2}}}};
  \node[draw=none, green!60!black, xshift=-2mm, yshift=0mm] at (b'.north) {\small{\ensuremath{\mathtt{3}}}};
  \draw[solid] (b_1) edge (b'.east);
Jaime Arias's avatar
Jaime Arias committed
53
  \node[draw=red, SEQ, xshift=-1.250000cm , below of=b'] (d_1) {\ensuremath{\mathtt{d_{1}}}};
Jaime Arias's avatar
Jaime Arias committed
54
55
56
  \node[draw=none, blue, xshift=2mm, yshift=0mm] at (d_1.east) {\small{\ensuremath{\mathtt{2}}}};
  \node[draw=none, green!60!black, xshift=-2mm, yshift=0mm] at (d_1.west) {\small{\ensuremath{\mathtt{1}}}};
  \draw[solid] (b'.input 1) edge (d_1);
Jaime Arias's avatar
Jaime Arias committed
57
  \node[draw=red, SEQ, xshift=1.250000cm , below of=b'] (e_3) {\ensuremath{\mathtt{e_{3}}}};
Jaime Arias's avatar
Jaime Arias committed
58
59
60
  \node[draw=none, blue, xshift=2mm, yshift=0mm] at (e_3.east) {\small{\ensuremath{\mathtt{2}}}};
  \node[draw=none, green!60!black, xshift=-2mm, yshift=0mm] at (e_3.west) {\small{\ensuremath{\mathtt{3}}}};
  \draw[solid] (b'.input 2) edge (e_3);
Jaime Arias's avatar
Jaime Arias committed
61
  \node[draw=red, SEQ, xshift=-0.000000cm , below of=e_3] (e_2) {\ensuremath{\mathtt{e_{2}}}};
Jaime Arias's avatar
Jaime Arias committed
62
63
64
  \node[draw=none, blue, xshift=2mm, yshift=0mm] at (e_2.east) {\small{\ensuremath{\mathtt{3}}}};
  \node[draw=none, green!60!black, xshift=-2mm, yshift=0mm] at (e_2.west) {\small{\ensuremath{\mathtt{2}}}};
  \draw[solid] (e_3) edge (e_2);
Jaime Arias's avatar
Jaime Arias committed
65
  \node[draw=red, SEQ, xshift=-0.000000cm , below of=e_2] (e_1) {\ensuremath{\mathtt{e_{1}}}};
Jaime Arias's avatar
Jaime Arias committed
66
67
68
  \node[draw=none, blue, xshift=2mm, yshift=0mm] at (e_1.east) {\small{\ensuremath{\mathtt{4}}}};
  \node[draw=none, green!60!black, xshift=-2mm, yshift=0mm] at (e_1.west) {\small{\ensuremath{\mathtt{1}}}};
  \draw[solid] (e_2) edge (e_1);
Jaime Arias's avatar
Jaime Arias committed
69
  \node[draw=red, state, xshift=-0.000000cm , below of=e_1] (e') {\ensuremath{\mathtt{e'}}};
Jaime Arias's avatar
Jaime Arias committed
70
71
72
  \node[draw=none, blue, xshift=2mm, yshift=0mm] at (e'.east) {\small{\ensuremath{\mathtt{5}}}};
  \node[draw=none, green!60!black, xshift=-2mm, yshift=0mm] at (e'.west) {\small{\ensuremath{\mathtt{0}}}};
  \draw[solid] (e_1) edge (e');
Jaime Arias's avatar
Jaime Arias committed
73
  \node[draw=red, state, xshift=-0.000000cm , below of=d_1] (d') {\ensuremath{\mathtt{d'}}};
Jaime Arias's avatar
Jaime Arias committed
74
75
76
  \node[draw=none, blue, xshift=2mm, yshift=0mm] at (d'.east) {\small{\ensuremath{\mathtt{3}}}};
  \node[draw=none, green!60!black, xshift=-2mm, yshift=0mm] at (d'.west) {\small{\ensuremath{\mathtt{0}}}};
  \draw[solid] (d_1) edge (d');
Jaime Arias's avatar
Jaime Arias committed
77
78
\end{tikzpicture}
\end{document}