MA0301/exam/graphics/14mod.tex

24 lines
939 B
TeX
Raw Permalink Normal View History

2021-08-29 19:57:57 +02:00
\begin{tikzpicture}
\tikzset{
->, % makes the edges directed
>=Stealth, % makes the arrow heads bold
node distance=5cm, % specifies the minimum distance between two nodes. Change if necessary.
every state/.style={thick, fill=white}, % sets the properties for each state node
initial text=$ $, % sets the text that appears on the start arrow
}
\node[state, ] (s0) {$s_0$};
\node[state, right of=s0] (s1) {$s_1$};
\node[state, right of=s1] (s2) {$s_2$};
\draw (s0) edge[bend right, above] node{$a,0$} (s1);
\draw (s0) edge[above] node{$c,1$} (s1);
\draw (s0) edge[loop,above] node{b,1} (s0);
\draw (s1) edge[above] node{$a,1$} (s2);
\draw (s1) edge[bend right=60, above] node{$b,0$} (s0);
\draw (s1) edge[bend right, above] node{$c,0$} (s0);
\draw (s2) edge[bend right, above] node{$a,0$} (s1);
\draw (s2) edge[bend left, below] node{$b,1$} (s0);
\draw (s2) edge[loop,above] node{c,0} (s2);
\end{tikzpicture}