summaryrefslogtreecommitdiff
path: root/graphics/jflap2tikz/examples/ex0_1a.tex
blob: d0032caf999cfd1869b92d9b98312992fe8012ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{automata,positioning,arrows.meta}
\usepackage[graphics,tightpage,active,pdftex]{preview}
\setlength{\PreviewBorder}{5pt}
\PreviewEnvironment{tikzpicture}
\begin{document}
\begin{tikzpicture}[>={Stealth[width=6pt,length=9pt]}, accepting/.style={double distance = 2pt, outer sep = 1pt + \pgflinewidth}, shorten >=1pt, auto]
  \draw (62.0pt, -114.0pt)node[state, initial, initial text =](0){$q_{0}$};
  \draw (163.0pt, -51.0pt)node[state](1){$q_{1}$};
  \draw (184.0pt, -162.0pt)node[state](2){$q_{2}$};
  \draw (275.0pt, -92.0pt)node[state, accepting](3){$q_{3}$};
  \path[->] (0) edge[bend left] node{b}(2);
  \path[->] (2) edge[bend left] node{a}(0);
  \path[->] (1) edge node{a}(2);
  \path[->] (0) edge node{$\lambda$}(1);
  \path[->] (1) edge node{a}(3);
\end{tikzpicture}
\end{document}