A state machine begins in an initial state, and then sequentially processes each input symbol. For each input symbol there is one reaction, which consists of a state transition and the generation of an output symbol. The reaction is governed by the update function:
update: States ´ Inputs ® States ´ Outputs
Let x Î InputSignals be the input, y Î OutputSignals be the output, and
s: Naturals0 ® States
be the state response. Then
s(0) = initialState
and for all n in Naturals,
(s(n + 1), y(n)) = update(s(n), x(n)).
This gives a constructive procedure for calculating the output event sequence given the initial state and the input event sequence.