In automata theory and sequential logic, a statetransition table is a table showing what state (or states in the case of a nondeterministic finite automaton) a finitestate machine will move to, based on the current state and other inputs. It is essentially a truth table in which the inputs include the current state along with other inputs, and the outputs include the next state along with other outputs.
A statetransition table is one of many ways to specify a finitestate machine. Other ways include a state diagram.
Statetransition tables are sometimes onedimensional tables, also called characteristic tables. They are much more like truth tables than their twodimensional form. The single dimension indicates inputs, current states, next states and (optionally) outputs associated with the state transitions.
Input  Current state  Next state  Output 

I_{1}  S_{1}  S_{i}  O_{x} 
I_{2}  S_{1}  S_{j}  O_{y} 
...  ...  ...  ... 
I_{n}  S_{1}  S_{k}  O_{z} 
I_{1}  S_{2}  S_{i?}  O_{x?} 
I_{2}  S_{2}  S_{j?}  O_{y?} 
...  ...  ...  ... 
I_{n}  S_{2}  S_{k?}  O_{z?} 
...  ...  ...  ... 
I_{1}  S_{m}  S_{i?}  O_{x?} 
I_{2}  S_{m}  S_{j?}  O_{y?} 
...  ...  ...  ... 
I_{n}  S_{m}  S_{k?}  O_{z?} 
Statetransition tables are typically twodimensional tables. There are two common ways for arranging them.
In the first way, one of the dimensions indicates current states, while the other indicates inputs. The row/column intersections indicate next states and (optionally) outputs associated with the state transitions.
Input Current state 
I_{1}  I_{2}  ...  I_{n} 

S_{1}  S_{i}/O_{x}  S_{j}/O_{y}  ...  S_{k}/O_{z} 
S_{2}  S_{i?}/O_{x?}  S_{j?}/O_{y?}  ...  S_{k?}/O_{z?} 
...  ...  ...  ...  ... 
S_{m}  S_{i?}/O_{x?}  S_{j?}/O_{z?}  ...  S_{k?}/O_{z?} 
In the second way, one of the dimensions indicates current states, while the other indicates next states. The row/column intersections indicate inputs and (optionally) outputs associated with the state transitions.
Next state Current state 
S_{1}  S_{2}  ...  S_{m} 

S_{1}  I_{i}/O_{x}    ...   
S_{2}      ...  I_{j}/O_{y} 
...  ...  ...  ...  ... 
S_{m}    I_{k}/O_{z}  ...   
Simultaneous transitions in multiple finitestate machines can be shown in what is effectively an ndimensional statetransition table in which pairs of rows map (sets of) current states to next states.^{[1]} This is an alternative to representing communication between separate, interdependent finitestate machines.
At the other extreme, separate tables have been used for each of the transitions within a single finitestate machine: "AND/OR tables"^{[2]} are similar to incomplete decision tables in which the decision for the rules which are present is implicitly the activation of the associated transition.
An example of a statetransition table together with the corresponding state diagram for a finitestate machine is given below:
Input Current state

0  1 

S_{1}  S_{2}  S_{1} 
S_{2}  S_{1}  S_{2} 
In the statetransition table, all possible inputs to the finitestate 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 S_{1} (the first row) and receives an input of 1 (second column), the machine will stay in the state S_{1}. Now if the machine is in the state S_{1} and receives an input of 0 (first column), the machine will transition to the state S_{2}.
In the state diagram, the former is denoted by the arrow looping from S_{1} to S_{1} labeled with a 1, and the latter is denoted by the arrow from S_{1} to S_{2} labeled with a 0. This process can be described statistically using Markov Chains.
For a nondeterministic finitestate machine, an input may cause the machine to be in more than one state, hence its nondeterminism. This is denoted in a statetransition table by the set of all target states enclosed in a pair of curly braces {}. An example of a statetransition table together with the corresponding state diagram for a nondeterministic finitestate machine is given below:
Input Current state

0  1 

S_{1}  S_{2}  S_{1} 
S_{2}  {S_{1}, S_{2}}  S_{2} 
If the machine is in the state S_{2} and receives an input of 0, the machine will be in two states at the same time, the states S_{1} and S_{2}.
It is possible to draw a state diagram from a statetransition table. A sequence of easy to follow steps is given below: