Math 2.0

Computer science Definition

Moore machine

Builds on Finite-state machineAlphabetStringMealy machine

Definition

A Moore machine is a tuple M=(Q,Σ,Γ,δ,λ,q0)M = (Q, \Sigma, \Gamma, \delta, \lambda, q_0) where:

  1. (Q,Σ,δ,q0)(Q, \Sigma, \delta, q_0) is a finite-state machine, with finite set of states QQ, input alphabet Σ\Sigma, transition function δ ⁣:Q×Σ→Q\delta \colon Q \times \Sigma \to Q and initial state q0q_0;
  2. Γ\Gamma is an alphabet, the output alphabet;
  3. λ ⁣:Q→Γ\lambda \colon Q \to \Gamma is the output function.

On an input string a1⋯ana_1 \cdots a_n with ai∈Σa_i \in \Sigma, let qi=δ(qi−1,ai)q_i = \delta(q_{i-1}, a_i) for 1≤i≤n1 \le i \le n. The output of MM is the string λ(q0) λ(q1)⋯λ(qn)∈Γ∗\lambda(q_0)\, \lambda(q_1) \cdots \lambda(q_n) \in \Gamma^*.

Remarks

Example: let Σ=Γ={0,1}\Sigma = \Gamma = \set{0, 1}, Q={0,1}Q = \set{0, 1}, q0=0q_0 = 0, δ(q,a)=q+a mod 2\delta(q, a) = q + a \bmod 2 and λ(q)=q\lambda(q) = q. Then qiq_i is the parity of the number of 11's among a1,…,aia_1, \ldots, a_i, and on 01100110 the output is 0010000100. Non-example: a machine with output function λ ⁣:Q×Σ→Γ\lambda \colon Q \times \Sigma \to \Gamma, depending on the input symbol too, fails clause 3; it is a Mealy machine. With this convention the output has length n+1n + 1; some authors drop λ(q0)\lambda(q_0) so that input and output have the same length. A Moore machine gives a Mealy machine with the same states by setting λ′(q,a)=λ(δ(q,a))\lambda'(q, a) = \lambda(\delta(q, a)); the converse needs, in general, up to ∣Q∣⋅∣Γ∣\abs{Q} \cdot \abs{\Gamma} states.

Reading path

To understand this page from the ground up, read these 5 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Alphabet concept
  2. Finite-state machine concept
  3. Mealy machine concept
  4. String concept
  5. Moore machine definition

Further reading

  1. Web https://en.wikipedia.org/wiki/Moore_machine
About this page
TagAH8MBMD6FF
URIm2://AH8MBMD6FF
Kinddefinition
WritingW0 stub
MSC68Q45
DefinesMoore machine
UsesFinite-state machine, Alphabet, String, Mealy machine
Changed3 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.