Skip to content

Instantly share code, notes, and snippets.

@katafrakt
Created April 5, 2018 15:25
Show Gist options
  • Select an option

  • Save katafrakt/d9458d61f60c51ff685eb62e14a5d277 to your computer and use it in GitHub Desktop.

Select an option

Save katafrakt/d9458d61f60c51ff685eb62e14a5d277 to your computer and use it in GitHub Desktop.

Revisions

  1. katafrakt created this gist Apr 5, 2018.
    11 changes: 11 additions & 0 deletions 001-simples.gv
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    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" ];
    }
    24 changes: 24 additions & 0 deletions 011-non-determ-with-hell.gv
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    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" ]
    }