LaTeX 画自动机

每次用 latex 画自动机都要去翻原来画的,神麻烦,干脆直接把代码放上来得了。

\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=2cm,
    thick,base node/.style={circle,draw,minimum size=16pt}, real node/.style={double,circle,draw,minimum size=35pt}]



\node[initial,initial text={}, accepting, state] (1) {$\epsilon$};
\node[state](2)[right of=1 ]{$51$}[above];

\path[]
(1) edge [loop below]node {$0,101$} (1)
(1) edge node {$51$} (2)
(2) edge [loop above]node {$0$} (2);


\end{tikzpicture}

画出来的图:
LaTeX 画自动机_第1张图片

你可能感兴趣的:(latex)