Simple Finite Automaton

012345abbabaccg

Tasks

add nodes 0 to 5 make the graph directed node 0 is the parent of node 1 node 0 is the parent of node 4 node 1 is a parent of node 2 node 1 is a parent of node 3 node 3 is a parent of node 4 node 4 is a parent of node 5 set the edge label for the edge from 0 to 1 to 'a' set the edge label for the edge from 0 to 4 to 'b' set the edge label for the edge from 1 to 2 to 'b' set the edge label for the edge from 1 to 3 to 'a' set the edge label for the edge from 3 to 4 to 'c' set the edge label for the edge from 4 to 5 to 'g' add an edge from node 2 to itself with edge label 'b' add an edge from node 3 to itself with edge label 'a' add an edge from node 4 to itself with edge label 'c' color node 2 green color node 5 green set each node's label to its name

JSON Representation

{
"directed": true,
"hasParents": true,
"nodes": {
  "0": {
    "label": "0"
  },
  "1": {
    "label": "1"
  },
  "2": {
    "fillColor": "green",
    "label": "2"
  },
  "3": {
    "label": "3"
  },
  "4": {
    "label": "4"
  },
  "5": {
    "fillColor": "green",
    "label": "5"
  }
},
"edges": {
  "12": {
    "source": "1",
    "target": "2",
    "label": "b"
  },
  "13": {
    "source": "1",
    "target": "3",
    "label": "a"
  },
  "22": {
    "source": "2",
    "target": "2",
    "label": "b"
  },
  "33": {
    "source": "3",
    "target": "3",
    "label": "a"
  },
  "34": {
    "source": "3",
    "target": "4",
    "label": "c"
  },
  "44": {
    "source": "4",
    "target": "4",
    "label": "c"
  },
  "45": {
    "source": "4",
    "target": "5",
    "label": "g"
  },
  "01": {
    "source": "0",
    "target": "1",
    "label": "a"
  },
  "04": {
    "source": "0",
    "target": "4",
    "label": "b"
  }
},
"constraints": [],
"_positions": {
  "0": [
    -4.634023976804145,
    -2.136595899489394
  ],
  "1": [
    -4.032248662779028,
    2.8499889628645034
  ],
  "2": [
    -0.4502409707726586,
    -4.854139796228444
  ],
  "3": [
    0.46391898176089025,
    5.015981190869867
  ],
  "4": [
    4.151264887627808,
    -2.9436234530281378
  ],
  "5": [
    4.501339237317559,
    2.0684951667365072
  ]
}
}