Skip to content

Instantly share code, notes, and snippets.

@xfbs
Created November 26, 2015 22:30
Show Gist options
  • Save xfbs/c72a6058e849cb20e9c3 to your computer and use it in GitHub Desktop.
Save xfbs/c72a6058e849cb20e9c3 to your computer and use it in GitHub Desktop.
\begin{tikzpicture}[shorten >=1pt,auto]
%\node[state,initial,accepting] (0_A) {$\{0,A\}$};
%\node[state] (1_B) at (2,2) {$\{1,B\}$};
%\node[state,accepting] (4_A) [right of=1_B] {$\{4,A\}$};
%\node[state] (1_C) [below of=0_A] {$\{1,C\}$};
%\node[state,accepting] (2_A) [below of=1_B] {$\{2,A\}$};
%\node[state] (4_B) [below of=4_A] {$\{4,B\}$};
%\node[state] (2_C) [below of=1_C] {$\{2,C\}$};
%\node[state,accepting] (3_C) [below of=2_A] {$\{3,C\}$};
%\node[state] (4_C) [below of=2_C] {$\{4,C\}$};
\node[state,initial above,accepting] (0_A) at (4,12) {$\{0,A\}$};
\node[state] (1_B) at (8,6) {$\{1,B\}$};
\node[state,accepting] (4_A) at (4,0) {$\{4,A\}$};
\node[state] (1_C) at (4,9) {$\{1,C\}$};
\node[state,accepting] (2_A) at (6,3) {$\{2,A\}$};
\node[state] (4_B) at (4,2) {$\{4,B\}$};
\node[state] (2_C) at (4,7) {$\{2,C\}$};
\node[state,accepting] (3_C) at (4,5) {$\{3,C\}$};
\node[state] (4_C) at (0,6) {$\{4,C\}$};
\path[->]
(0_A) edge [bend left=40] node {$a$} (1_B)
(0_A) edge [bend right=40] node [swap] {$a,b,c$} (4_C)
(2_A) edge [bend left] node {$a$} (4_B)
(2_A) edge [bend right] node {$b$} (2_C)
(2_A) edge [bend right] node {$c$} (3_C)
(2_A) edge [bend left=37] node [swap] {$d$} (4_C)
(4_A) edge [bend right] node [swap] {$a$} (4_B)
(4_A) edge [bend left=40] node {$b,c,d$} (4_C)
(1_B) edge [bend right] node [swap] {$a$} (1_C)
(1_B) edge [bend left] node {$b$} (2_A)
(1_B) edge [bend left=40] node {$c,d$} (4_A)
(4_B) edge [bend left=18] node {$a$} (4_C)
(4_B) edge [bend right] node [swap] {$b,c,d$} (4_A)
(1_C) edge [loop above] node {$a$} ()
(1_C) edge node {$b$} (2_C)
(1_C) edge [bend right] node [swap] {$c,d$} (4_C)
(2_C) edge [bend right] node [swap] {$a,d$} (4_C)
(2_C) edge [loop right] node {$b$} ()
(2_C) edge node {$c$} (3_C)
(3_C) edge [bend left] node [swap] {$a,b,d$} (4_C)
(3_C) edge [loop below] node {$c$} (3_C)
(4_C) edge [loop left] node {$a,b,c,d$} ();
\end{tikzpicture}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment