
- Automata Theory - Applications
- Automata Terminology
- Basics of String in Automata
- Set Theory for Automata
- Finite Sets and Infinite Sets
- Algebraic Operations on Sets
- Relations Sets in Automata Theory
- Graph and Tree in Automata Theory
- Transition Table in Automata
- What is Queue Automata?
- Compound Finite Automata
- Complementation Process in DFA
- Closure Properties in Automata
- Concatenation Process in DFA
- Language and Grammars
- Language and Grammar
- Grammars in Theory of Computation
- Language Generated by a Grammar
- Chomsky Classification of Grammars
- Context-Sensitive Languages
- Finite Automata
- What is Finite Automata?
- Finite Automata Types
- Applications of Finite Automata
- Limitations of Finite Automata
- Two-way Deterministic Finite Automata
- Deterministic Finite Automaton (DFA)
- Non-deterministic Finite Automaton (NFA)
- NDFA to DFA Conversion
- Equivalence of NFA and DFA
- Dead State in Finite Automata
- Minimization of DFA
- Automata Moore Machine
- Automata Mealy Machine
- Moore vs Mealy Machines
- Moore to Mealy Machine
- Mealy to Moore Machine
- Myhill–Nerode Theorem
- Mealy Machine for 1’s Complement
- Finite Automata Exercises
- Complement of DFA
- Regular Expressions
- Regular Expression in Automata
- Regular Expression Identities
- Applications of Regular Expression
- Regular Expressions vs Regular Grammar
- Kleene Closure in Automata
- Arden’s Theorem in Automata
- Convert Regular Expression to Finite Automata
- Conversion of Regular Expression to DFA
- Equivalence of Two Finite Automata
- Equivalence of Two Regular Expressions
- Convert Regular Expression to Regular Grammar
- Convert Regular Grammar to Finite Automata
- Pumping Lemma in Theory of Computation
- Pumping Lemma for Regular Grammar
- Pumping Lemma for Regular Expression
- Pumping Lemma for Regular Languages
- Applications of Pumping Lemma
- Closure Properties of Regular Set
- Closure Properties of Regular Language
- Decision Problems for Regular Languages
- Decision Problems for Automata and Grammars
- Conversion of Epsilon-NFA to DFA
- Regular Sets in Theory of Computation
- Context-Free Grammars
- Context-Free Grammars (CFG)
- Derivation Tree
- Parse Tree
- Ambiguity in Context-Free Grammar
- CFG vs Regular Grammar
- Applications of Context-Free Grammar
- Left Recursion and Left Factoring
- Closure Properties of Context Free Languages
- Simplifying Context Free Grammars
- Removal of Useless Symbols in CFG
- Removal Unit Production in CFG
- Removal of Null Productions in CFG
- Linear Grammar
- Chomsky Normal Form (CNF)
- Greibach Normal Form (GNF)
- Pumping Lemma for Context-Free Grammars
- Decision Problems of CFG
- Pushdown Automata
- Pushdown Automata (PDA)
- Pushdown Automata Acceptance
- Deterministic Pushdown Automata
- Non-deterministic Pushdown Automata
- Construction of PDA from CFG
- CFG Equivalent to PDA Conversion
- Pushdown Automata Graphical Notation
- Pushdown Automata and Parsing
- Two-stack Pushdown Automata
- Turing Machines
- Basics of Turing Machine (TM)
- Representation of Turing Machine
- Examples of Turing Machine
- Turing Machine Accepted Languages
- Variations of Turing Machine
- Multi-tape Turing Machine
- Multi-head Turing Machine
- Multitrack Turing Machine
- Non-Deterministic Turing Machine
- Semi-Infinite Tape Turing Machine
- K-dimensional Turing Machine
- Enumerator Turing Machine
- Universal Turing Machine
- Restricted Turing Machine
- Convert Regular Expression to Turing Machine
- Two-stack PDA and Turing Machine
- Turing Machine as Integer Function
- Post–Turing Machine
- Turing Machine for Addition
- Turing Machine for Copying Data
- Turing Machine as Comparator
- Turing Machine for Multiplication
- Turing Machine for Subtraction
- Modifications to Standard Turing Machine
- Linear-Bounded Automata (LBA)
- Church's Thesis for Turing Machine
- Recursively Enumerable Language
- Computability & Undecidability
- Turing Language Decidability
- Undecidable Languages
- Turing Machine and Grammar
- Kuroda Normal Form
- Converting Grammar to Kuroda Normal Form
- Decidability
- Undecidability
- Reducibility
- Halting Problem
- Turing Machine Halting Problem
- Rice's Theorem in Theory of Computation
- Post’s Correspondence Problem (PCP)
- Types of Functions
- Recursive Functions
- Injective Functions
- Surjective Function
- Bijective Function
- Partial Recursive Function
- Total Recursive Function
- Primitive Recursive Function
- μ Recursive Function
- Ackermann’s Function
- Russell’s Paradox
- Gödel Numbering
- Recursive Enumerations
- Kleene's Theorem
- Kleene's Recursion Theorem
- Advanced Concepts
- Matrix Grammars
- Probabilistic Finite Automata
- Cellular Automata
- Reduction of CFG
- Reduction Theorem
- Regular expression to ∈-NFA
- Quotient Operation
- Parikh’s Theorem
- Ladner’s Theorem
Mealy to Moore Machine Conversion
Mealy and Moore machines are special finite state machines that generate outputs. In this chapter, we will explain how to convert a Mealy machine to a Moore machine. We'll use the state diagram of the Mealy machine as our starting point and learn how to convert it into its equivalent state diagram of the Moore machine through intermediate states.
Concepts of Moore and Mealy Machines
The output of a Moore machine is represented on the state itself, as is common knowledge. On the other hand, the output of a Mealy machine is displayed on the transition, or more precisely, on the arrow itself.
Moore-to-Mealy conversion is comparatively easier than the Mealy-to-Moore conversion. Let's discuss a few of the conversion guidelines.
Basic Conversion Rules
Converting a Mealy machine to Moore machine is little complex where it needs additional intermediate states.
Imagine there is a state 'A' with two incoming transitions. In one transition, the input is '0' and output is 1, while in the second transition, the input is '1' and output is also 1.

In the equivalent Moore representation, we'll write the '1' alongside state. This '1' represents the output when we reach the state 'A'.

This is done because of we have the same output 1 for inputs 0 and 1. But for the following case with different output in Mealy.

It will have two different states in Moore machine −

Conversion Stages: Mealy to Moore Machine
To convert a Mealy machine to its equivalent Moore machine, we must follow the steps given below −
Identify Incoming Transitions
For each state in the Mealy machine, carefully get all the incoming transitions.
Analyze the Outputs
Analyze the outputs associated with these incoming transitions.
- Case 1: Same Outputs − If all incoming transitions to a state have the same output, no splitting is needed. We can directly write that output within the state itself in the Moore diagram.
- Case 2: Different Outputs − If incoming transitions to a state have different outputs, we must split that state into multiple states in the Moore diagram. The number of new states will equal the number of unique outputs for the original state.
Splitting States
When there is a splitting a state, assign a new state for each unique output.
Label these new states based on the original state and their corresponding output. As given in the above diagrams, if the original state is 'A' and we have outputs '0' and '1', we create states 'A0' and 'A1' in the Moore diagram.
Incoming transitions from the Mealy diagram are directed to the corresponding new states based on their outputs. From the above example we can get, a Mealy transition with output '1' to state 'A' will now go to state 'A1' in the Moore diagram.
Outgoing Transitions
All outgoing transitions from the original Mealy state will be copied to each of the newly generated Moore states.
Example of Mealy to Moore Machine Conversion
Consider we have a Mealy machine state diagram with four states −

State Transition Table
The state transition table is like below −
PS | Next State (X = 0) | Next State (X = 1) | Output (X = 0) | Output (X = 1) |
---|---|---|---|---|
A | A | B | 0 | 0 |
B | C | D | 0 | 0 |
C | A | C | 0 | 0 |
D | B | A | 1 | 1 |
From the above diagram and table, we can analyze that A, C and D has no splitting since all outputs are the same while reaching at that state, but for B, it is generating 0 for incoming ages from A, B abd C, but output 1 for edge coming from D.
Now let us try to make the Moore machine diagram corresponding to the previous Mealy diagram −

State | Output | Input = 0 | Input = 1 |
---|---|---|---|
A | 0 | A | B |
B0 | 0 | C | B0 |
B1 | 1 | C | B0 |
C | 0 | D | B0 |
D | 0 | A | B1 |
Let us take another example −

Here, we can see A can be split into A0 and A1 and B will be B0 and B1. So, the final diagram will be like this −

Conclusion
Converting a Mealy machine to a Moore machine needs to analyze the incoming transitions and splitting states based on unique outputs. In this chapter, we explained the steps for each and individual concepts in detail.
By following the steps, we can systematically create an equivalent Moore machine that replicates the functionality of the original Mealy machine, as we have seen through the examples and transition tables.