Moore Machine

1 min read Updated Fri Apr 24 2026 07:36:29 GMT+0000 (Coordinated Universal Time)

A finite automaton with outputs where output depends only on the current state. A 6-tuple.

Suppose M=(Q,Σ,Δ,q0,δ,λ) M = (Q, \Sigma, \Delta, q_0, \delta, \lambda) is a Moore machine, where:

  • QQ is a finite set of states
  • Σ\Sigma is a finite input alphabet
  • Δ\Delta is a finite output alphabet
  • q0Qq_0 \in Q is the initial state
  • δ:Q×ΣQ\delta : Q \times \Sigma \rightarrow Q is the transition function
  • λ:QΔ\lambda : Q \rightarrow \Delta is the output function
    Each state has a fixed output value.

Output is attached to states only. Output sequence length depends on the number of visited states.

Conversion from FA

All FAs have an associated Moore machine.

For a given FA M=(Q,Σ,q0,A,δ)M = (Q, \Sigma, q_0, A, \delta), we can construct a Moore machine M=(Q,Σ,Δ,q0,δ,λ)M' = (Q, \Sigma, \Delta, q_0, \delta, \lambda) where:

  • Δ={0,1}\Delta = \set{0, 1}
  • λ(q)=1\lambda(q) = 1 if qAq \in A, else λ(q)=0\lambda(q) = 0