A finite state transducer where output depends only on the current state. A 6-tuple.
where:
- is a finite set of states
- is the input alphabet
- is the output alphabet
- is the initial state
- is the transition function
- is the output function (state output symbol)
Output is associated with states, not transitions. On input of length , the output sequence has length (one output per state visited, including the initial state).
Example
A Moore machine that outputs when the number of s seen is even and when odd:
- States: with ,
- ,
Starting in , input aaa visits and outputs EOEO.
Conversion from FA
Every FA has an equivalent Moore machine recognizing the same language.
For FA , construct Moore machine where:
- if , else
Conversion to Mealy Machine
Every Moore machine has an equivalent Mealy machine. For each transition , create a Mealy output (copy the Moore output of the destination state onto the transition).
The resulting Mealy machine has the same states but produces output on transitions instead of states.