← RGPV CS-501 Theory of Computation May 2023 Solved Paper
Question
Convert both Moore machines to Mealy machines. Both start at q₀/0 and have q₁/1. Machine (i): q₀ loops on a, moves to q₁ on b; q₁ loops on a,b. Machine (ii): both printed arrows labelled a,b point from q₀ to q₁; no outgoing transition from q₁ is shown.
Asked in: CS-501 | May 2023 | 1
Answer
In a Moore machine output is attached to states. In a Mealy machine it is attached to transitions. For every transition p —x→ q, assign output λ(q), the output of the destination state. The initial Moore output is not emitted by the converted Mealy machine before input.
Machine (i): q0 has output 0 and q1 output 1. From q0, a leads to q0 with output 0; b leads to q1 with output 1. From q1, both a and b lead to q1 with output 1. For input aab, the Mealy output is 001.
Machine (ii): the printed arrows both point from q0 to q1 and are labelled a,b. Both therefore become a/1,b/1; no outgoing transitions from q1 are specified. This is a partial machine. If the lower arrow was intended to return from q1 to q0, label it a/0,b/0. Under that assumption the machine alternates outputs 1,0,1,0. The literal diagram does not justify assuming that return transition.

Discussion
Ask a question, share your thoughts or report an error.
Sign in to participate in the discussion.
Join the discussion