Finite State Machine : State Reduction and State Assignment in the State Diagram