Running finite_automata on example.fa, hw1.fa, hw2.fa, hw3.fa, hw4.fa, hw5.fa, mod_2_3.fa, mod_2_3_nfa.fa . ===== example.fa ===== states : [ q0, q1, r0, r1, r2, s ] accept : [ q0, r0 ] alphabet : [ 0, 1 ] start : s tests : yes [ ] no [ 0, 0, 0, 0, 0 ] yes [ 1, 1, 1, 1 ] no [ 1, 0, 1, 0 ] yes [ 1, 1, 1, 0, 0, 0 ] transitions : q0 x 1 => q1 q1 x 1 => q0 r0 x [ 0, 1 ] => r1 r1 x [ 0, 1 ] => r2 r2 x [ 0, 1 ] => r0 s x ~ => q0 s x ~ => r0 analysis : It's not a strict DFA. Running inputs and tests : '' => yes (ok) '00000' => no (ok) '1111' => yes (ok) '1010' => no (ok) '111000' => yes (ok) Passed all 5 tests. Diagram created in file 'example.png' ===== hw1.fa ===== states : [ 1, 2, 3 ] accept : [ 1, 2 ] alphabet : [ a, b ] start : 1 tests : yes [ a, a, a ] yes [ a, a, a, a, a, a ] no [ b ] yes [ b, b ] yes [ b, b, b ] no [ b, b, b, b ] yes [ b, b, b, b, b ] no [ a, a, a, a, a, b ] no [ a, a, a, b, a, a, a ] transitions : 1 x a => 1 1 x b => 3 2 x b => 1 2 x a => 3 3 x b => 2 3 x a => 3 analysis : It's a strict DFA. Running inputs and tests : 'aaa' => yes (ok) 'aaaaaa' => yes (ok) 'b' => no (ok) 'bb' => yes (ok) 'bbb' => yes (ok) 'bbbb' => no (ok) 'bbbbb' => yes (ok) 'aaaaab' => no (ok) 'aaabaaa' => no (ok) Passed all 9 tests. Diagram created in file 'hw1.png' ===== hw2.fa ===== states : [ 1, 2, 3 ] accept : [ 2 ] alphabet : [ a, b ] start : 1 tests : yes [ ] yes [ a, a ] yes [ a ] yes [ a, b ] yes [ a, b, b ] no [ b ] no [ b, a ] transitions : 1 x ~ => 2 1 x a => 3 2 x a => 1 3 x [ a, b ] => 2 3 x b => 3 analysis : It's not a strict DFA. Running inputs and tests : '' => yes (ok) 'aa' => yes (ok) 'a' => yes (ok) 'ab' => yes (ok) 'abb' => yes (ok) 'b' => no (ok) 'ba' => no (ok) Passed all 7 tests. Diagram created in file 'hw2.png' ===== hw3.fa ===== states : [ a, b, c ] accept : [ c ] alphabet : [ 0, 1 ] start : a tests : no [ ] yes [ 1, 0 ] no [ 0, 1 ] yes [ 1, 1, 1, 1, 1, 0 ] yes [ 1, 0, 0, 0, 0, 0 ] transitions : a x 1 => b b x [ 0, 1 ] => b b x 0 => c analysis : It's not a strict DFA. Running inputs and tests : '' => no (ok) '10' => yes (ok) '01' => no (ok) '111110' => yes (ok) '100000' => yes (ok) Passed all 5 tests. Diagram created in file 'hw3.png' ===== hw4.fa ===== states : [ q0, q1, r0, r1, r2, s ] accept : [ q0, r2 ] alphabet : [ 0, 1 ] start : s tests : yes [ ] yes [ 1, 0, 0, 0, 1 ] no [ 1, 1, 0, 0, 0, 1, 1 ] yes [ 1, 1, 0, 0, 1, 1, 1, 0, 0 ] transitions : q0 x 1 => q0 q0 x 0 => q1 q1 x 0 => q0 q1 x 1 => q1 r0 x 0 => r0 r0 x 1 => r1 r1 x 0 => r1 r1 x 1 => r2 s x ~ => q0 s x ~ => r0 analysis : It's not a strict DFA. Running inputs and tests : '' => yes (ok) '10001' => yes (ok) '1100011' => no (ok) '110011100' => yes (ok) Passed all 4 tests. Diagram created in file 'hw4.png' ===== hw5.fa ===== states : [ q0, q1, q2, q3, q4, r0, r1, r2, r3, r4, s ] accept : [ q4, rS, r0, r1, r2, r3 ] alphabet : [ 0, 1 ] start : s tests : yes [ ] yes [ 1, 1, 0, 0 ] yes [ 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 ] no [ 1, 0, 1, 0 ] no [ 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0 ] no [ 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 ] yes [ 1, 1, 0, 0, 1, 1, 1, 0, 0 ] no [ 1, 0, 1, 1, 0, 1, 0 ] no [ 1, 0, 0, 1, 0, 1, 0 ] transitions : q0 x [ 0, 1 ] => q0 q0 x 1 => q1 q1 x 1 => q2 q2 x 0 => q3 q3 x 0 => q4 q4 x [ 0, 1 ] => q4 r0 x 0 => r0 r0 x 1 => r1 r1 x 1 => r0 r1 x 0 => r2 r2 x 0 => r0 r2 x 1 => r3 r3 x 1 => r1 r3 x 0 => r4 s x ~ => q0 s x ~ => r0 analysis : It's not a strict DFA. Running inputs and tests : '' => yes (ok) '1100' => yes (ok) '111110000000' => yes (ok) '1010' => no (ok) '1111111010000000' => no (ok) '101010101010' => no (ok) '110011100' => yes (ok) '1011010' => no (ok) '1001010' => no (ok) Passed all 9 tests. Diagram created in file 'hw5.png' ===== mod_2_3.fa ===== states : [ a, b, c, d, e, f ] accept : [ a, c, d, e ] alphabet : [ 0, 1 ] start : a tests : yes [ ] yes [ ] no [ 1 ] yes [ 1, 1 ] yes [ 1, 1, 1 ] yes [ 1, 1, 1, 0 ] no [ 0, 0, 0, 0, 0 ] yes [ 0, 0, 1, 1, 0, 0 ] no [ 1, 1, 1, 1, 1, 1, 1 ] transitions : a x [ 0, 1 ] => b b x [ 0, 1 ] => c c x [ 0, 1 ] => d d x [ 0, 1 ] => e e x [ 0, 1 ] => f f x [ 0, 1 ] => a analysis : It's a strict DFA. Running inputs and tests : '' => yes (ok) '' => yes (ok) '1' => no (ok) '11' => yes (ok) '111' => yes (ok) '1110' => yes (ok) '00000' => no (ok) '001100' => yes (ok) '1111111' => no (ok) Passed all 9 tests. Diagram created in file 'mod_2_3.png' ===== mod_2_3_nfa.fa ===== states : [ s, q0, q1, r0, r1, r2 ] accept : [ q0, r0 ] alphabet : [ 0, 1 ] start : s tests : no [ 1 ] yes [ 1, 1, 1, 1 ] no [ 1, 1, 1, 1, 1 ] yes [ 1, 1, 1, 1, 1, 1 ] transitions : q0 x [ 0, 1 ] => q1 q1 x [ 0, 1 ] => q0 r0 x [ 0, 1 ] => r1 r1 x [ 0, 1 ] => r2 r2 x [ 0, 1 ] => r0 s x ~ => q0 s x ~ => r0 analysis : It's not a strict DFA. Running inputs and tests : '1' => no (ok) '1111' => yes (ok) '11111' => no (ok) '111111' => yes (ok) Passed all 4 tests. Diagram created in file 'mod_2_3_nfa.png' ===== summary ===== N automata : 8 total tests : 52 failed tests : 0