← RGPV CD-501 Theory of Computation December 2024 Solved Question Paper
Question
Convert the Mealy machine to an equivalent Moore machine. Initial q₁; transitions (input/output): q₁→q₁ on a/1, q₁→q₂ on b/0; q₂→q₄ on a/1 and b/1; q₄→q₃ on a/0, q₄→q₁ on b/1; q₃→q₂ on a/1, q₃→q₃ on b/1.
Asked in: CD-501 | December 2024 | 6(a)
Answer
Name the original states A,B,C,D in left-to-right order to avoid ambiguity in the small printed labels. The initial state is A. Each edge label is input/output.
| State | a | b |
|---|---|---|
| A | A/1 | B/0 |
| B | C/1 | C/1 |
| C | D/0 | A/1 |
| D | B/1 | D/1 |
In a Moore machine the output belongs to the destination state. Create one copy of each original state for every distinct output on incoming transitions. A has incoming output 1, B has 0 and 1, C has 1, and D has 0 and 1. Add an initial state I with no output (or a dummy output ignored in comparison).
For each Mealy transition P on x to Q with output y, every copy of P transitions on x to Qᵧ. The initial state follows the original A transitions.
| Moore state | Output | a | b |
|---|---|---|---|
| I | – | A₁ | B₀ |
| A₁ | 1 | A₁ | B₀ |
| B₀ | 0 | C₁ | C₁ |
| B₁ | 1 | C₁ | C₁ |
| C₁ | 1 | D₀ | A₁ |
| D₀ | 0 | B₁ | D₁ |
| D₁ | 1 | B₁ | D₁ |
For input baa, the Mealy outputs are 0,1,0; the Moore path I→B₀→C₁→D₀ yields the same outputs after ignoring the initial dummy output. The construction preserves every subsequent output by induction on input length.

← RGPV CD-501 Theory of Computation December 2024 Solved Question Paper
Discussion
Ask a question, share your thoughts or report an error.
Sign in to participate in the discussion.
Join the discussion