# Moore Machine - Automata Theory

Reading Time:- 1 min 55 sec

Reading Time:- 1 min 55 sec

BY TEJAS
Student, Web Developer, Great Programmer

Moore machine is a finite state machine in which the next state is decided by the current state and current input symbol.

Moore Machine is a Finite Automata with no final states and it produces the output sequence for the given input sequence.
In Moore Machine output is associated with each state. A Moore Machine has a six tuples (Q, ∑, ∆, δ, λ, q0)

Q = Finite set of states
∑ = Input Alphabet
∆ = Output Alphabet
δ = Transition Function
λ = Output Mapping
q0 = Start State

Q. Design a Moore Machine to output
'A' if input ends in "101"
'B' if input ends in "110"
'C' otherwise our ∑={0, 1}

→  Step 1:- Definition of Moore Machine
Q = Finite set of states
∑ = Input Alphabet
∆ = Output Alphabet
δ = Transition Function
λ = Output Mapping
q0 = Start State

Step 2:- Logic

S/I 0 1
→     qs q0 q1
0    q0 q0 q1
1     q1 q2 q4
10     q2 q0 q3
101     q3 q2 q4
11     q4 q5 q4
110     q5 q0 q3

Step 3:- Implementation
m = (Q, ∑, ∆, δ, λ, q0)
Q = (q0, q1, q2, q3, q4, q5)
∑ = (0, 1)
∆ = (A, B, C), q0 = q0

Moore Machine Diagram

Step 4:- Example
(q0, 1101) → C
(q1, 101) → C
(q4, 01) → C
(q5, 1) → A

Thank you, please Comment down below if you find any difficulty on this topic.