Deterministic Finite Automaton X16856


Statement
 

pdf   zip

The HTML version of the statement is not available.

Public test cases
  • Input

    q1 q2 q3 q4
    0 1
    q1
    q4
    0 q2 1 q1
    0 q3 1 q1
    0 q3 1 q4
    0 q4 1 q4
    011001100
    

    Output

    Input string accepted
    
  • Input

    s q1 q2 r1 r2
    a b
    s
    q1 r1
    a q1 b r1
    a q1 b q2
    a q1 b q2
    a r2 b r1
    a r2 b r1
    baba
    

    Output

    Input string rejected
    
  • Input

    q1 q2
    a b c
    q1
    q1
    a q2 b q1 c q2
    a q1 b q1
    abc
    

    Output

    This is not a deterministic finite automaton!
    
  • Information
    Author
    HP CodeWars
    Language
    English
    Official solutions
    Python
    User solutions
    Python