feat(at-2)
This commit is contained in:
38
at/24-2/2/automata.tex
Executable file
38
at/24-2/2/automata.tex
Executable file
@ -0,0 +1,38 @@
|
||||
\documentclass{article}
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{automata, positioning}
|
||||
\begin{document}
|
||||
|
||||
\begin{tikzpicture}[shorten >=1pt, node distance=2.2cm, on grid, auto]
|
||||
|
||||
% Определение состояний
|
||||
\node[state] (s0) {S0: 0};
|
||||
\node[state] (s1) [right=of s0] {S1: 0};
|
||||
\node[state] (s2) [right=of s1] {S2: 0};
|
||||
\node[state] (s3) [right=of s2] {S3: 0};
|
||||
\node[state] (s4) [right=of s3] {S4: 0};
|
||||
\node[state, accepting] (s5) [right=of s4] {S5: 1};
|
||||
|
||||
% Определение переходов
|
||||
\path[->]
|
||||
(s0)
|
||||
edge node {1} node [below] {..1} (s1)
|
||||
edge [loop above] node {0} (s0)
|
||||
(s1)
|
||||
edge node {1} node [below] {..11} (s2)
|
||||
edge [bend left] node [below] {0} (s0)
|
||||
(s2)
|
||||
edge node {0} node [below] {..110} (s3)
|
||||
edge [loop above] node {1} (s2)
|
||||
(s3)
|
||||
edge node {1} node [below] {..1101} (s4)
|
||||
edge [bend left=40] node [below] {0} (s0)
|
||||
(s4)
|
||||
edge node {1} node [below] {..11011} (s5)
|
||||
edge [bend right=40] node [above] {0} (s0)
|
||||
(s5)
|
||||
edge [loop above] node {0, 1} (s5);
|
||||
|
||||
\end{tikzpicture}
|
||||
|
||||
\end{document}
|
||||
Reference in New Issue
Block a user