Moore machine
A Moore machine that consists of the following
- The finite number of states such as q0, q1, q2…qn where q0 is the initial state.
- Finite input alphabet such as ∑ = {a, b, c…..}.
- Finite output alphabet such as γ = “gema”
- Γ={x, y, z…..}
- It contains a transition table.
- It contains an output table.
∑ = {a, b}
Γ= {0, 1}
Transition Table:
New states after reading
Old State |
a | b | output |
Q0 | Q1 | Q3 | 1 |
Q1 | Q3 | Q1 | 0 |
Q2 | Q0 | Q3 | 0 |
Q3 | Q3 | Q2 | 1 |
∑ = {a, b}
Γ= {0, 1}
Strings that are given are as follows
abbabbba
input | a | b | B | a | b | b | b | a | |
state | Q0 | Q1 | Q1 | Q1 | Q3 | Q2 | Q3 | Q2 | Q0 |
output | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 |
The Moore machine will be as follows
Mealy machine
The mealy machine does not contain the transition table and also a slight difference that output in the output table will be null or not contains any value.
Strings that are given are as follows
abbabbba
input | a | b | B | a | b | b | b | a | |
state | Q0 | Q1 | Q1 | Q1 | Q3 | Q2 | Q3 | Q2 | Q0 |
output | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 |
The Moore machine will be as follows