A Moore machine is a finite state machine that has an output value rather than a final state. For a given input, the machine generates a corresponding output. The output of the Moore machine depends only on the present state of the FA.
Unlike other finite automata that determine the acceptance of a particular string in a given language, Moore machines determine the output against given input.
The Moore machine is a 6 tuple machine
Note: The output function means that for every state there is a corresponding output associated with it.
The Moore machine forms an FA of the type:
In the machine above, the transition on input
Note: If the input string is of length
, the output produced by a Moore machine will be of length .
Suppose we have the following Moore machine:
Now, we take an input string in
The transition table for the above machine will be:
Current State | Destination State for 0 | Destination State for 1 | Output |
q0 | q0 | q1 | a |
q1 | q2 | q0 | b |
q2 | q0 | q1 | a |
A transition table contains all the properties of a Moore machine. As a result, it can also be used to form a Moore machine.
Note: To learn about a faster type of output generating machine, the Mealy machine, click here.
Free Resources