automaton

An automaton library & basic programs written in Rust
git clone git://git.ethandl.dev/automaton
Log | Files | Refs | README

even_0s_or_1s.enfa (419B)


      1 {
      2     "description": "The following NFA accepts any binary string with an even number of '0's or '1's, or a string that is all '0's or '1's",
      3     "alphabet": [0, 1],
      4     "states": [0, 1, 2, 3, 4],
      5     "initial_state": 0,
      6     "final_states": [1, 3],
      7     "transition_table": [
      8         [0, [], [], [1, 3]],
      9         [1, [2], [1], []],
     10         [2, [1], [2], []],
     11         [3, [3], [4], []],
     12         [4, [4], [3], []]
     13     ]
     14 }