An example of a state-transition table together with the corresponding
state diagram for a finite-state machine that accepts a string with an even number 0s is given below: : In the state-transition table, all possible inputs to the finite-state machine are enumerated across the columns of the table, while all possible states are enumerated across the rows. If the machine is in the state S1 (the first row) and receives an input of 1 (second column), the machine will stay in the state S1. Now if the machine is in the state S1 and receives an input of 0 (first column), the machine will transition to the state S2. In the state diagram, the former is denoted by the arrow looping from S1 to S1 labeled with a 1, and the latter is denoted by the arrow from S1 to S2 labeled with a 0. This process can be described statistically using
Markov Chains. For a
nondeterministic finite-state machine, an input may cause the machine to be in more than one state, hence its
non-determinism. This is denoted in a state-transition table by the set of all target states enclosed in a pair of braces {}. An example of a state-transition table together with the corresponding state diagram for a nondeterministic finite-state machine is given below: : If the machine is in the state S2 and receives an input of 0, the machine will be in two states at the same time, the states S1 and S2. == Transformations from/to state diagram ==