Mealy Machines
Mealy machines are also finite state machines with output value and their output depends on the present state and current input symbol. It can be defined as (Q, q0, ∑, O, δ, λ’) where:
- Q is a finite set of states.
- q0 is the initial state.
- ∑ is the input alphabet.
- O is the output alphabet.
- δ is the transition function which maps Q×∑ → Q.
- ‘λ’ is the output function that maps Q×∑→ O.
In the mealy machine shown in Figure 1, the output is represented with each input symbol for each state separated by /. The length of output for a mealy machine is equal to the length of input.
- Input:1,1
- Transition: δ (q0,1,1)=> δ(q2,1)=>q2
- Output: 00 (q0 to q2 transition has Output 0 and q2 to q2 transition also has Output 0)
NOTE: If there are n inputs in the Mealy machine then it generates n outputs while if there are n inputs in the Moore machine then it generates n + 1 outputs.
Mealy and Moore Machines in TOC
Moore and Mealy Machines are Transducers that help in producing outputs based on the input of the current state or previous state. In this article we are going to discuss Moore Machines and Mealy Machines, the difference between these two machines as well as Conversion from Moore to Mealy and Conversion from Mealy to Moore Machines.