Skip to content

Instantly share code, notes, and snippets.

@katafrakt
Created April 5, 2018 15:25
Show Gist options
  • Save katafrakt/d9458d61f60c51ff685eb62e14a5d277 to your computer and use it in GitHub Desktop.
Save katafrakt/d9458d61f60c51ff685eb62e14a5d277 to your computer and use it in GitHub Desktop.
digraph finite_state_machine {
rankdir=LR;
size="8,5"
labelloc = "t";
label = "/a/";
"" [shape = none];
node [shape = doublecircle]; q1;
node [shape = circle];
"" -> q0;
q0 -> q1 [ label = "a" ];
}
digraph finite_state_machine {
rankdir=LR;
size="8,5";
label = "complete DFA";
labelloc = "t";
"" [shape = none];
node [shape = doublecircle]; q3, q8, "q3,q7";
node [shape = circle];
"" -> q0;
q0 -> q1 [ label = "a" ];
q1 -> "q2,q4,q6" [ label = "a" ];
"q2,q4,q6" -> q5 [ label = "a" ];
q5 -> q3 [ label = "c" ];
"q2,q4,q6" -> "q3,q7" [ label = "b" ];
"q3,q7" -> q8 [ label = "c" ];
q0 -> hell [ label = "b,c,d" ]
q1 -> hell [ label = "b,c,d" ]
"q2,q4,q6" -> hell [ label = "c,d" ]
"q3,q7" -> hell [ label = "a,b,d" ]
q8 -> hell [ label = "a,b,c,d" ]
q3 -> hell [ label = "a,b,c,d" ]
q5 -> hell [ label = "a,b,d" ]
hell -> hell [ label = "a,b,c,d" ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment