0
32kviews
Construct a Mealy machine to accept all strings ending with 00 or 11. Convert the same to Moore Machine (Patrial answer)
2 Answers
written 5.7 years ago by | modified 5.7 years ago by |
In the above diagram, we have assumed if string ends in 00 then o/p is A, if it ends in 11 o/p is B. otherwise C.
Mealy M/C
- | i/p = 0 | i/p = 1 | 0 | 1 | o/p |
---|---|---|---|---|---|
$\rightarrow$ $q_0$ | $q_1$, c | $q_3$,c $\rightarrow$ $q_0$ $\epsilon$ | $q_1$c | $q_3$c | $\epsilon$ |
$q_1$ | $q_2$, A | $q_3$,c $\rightarrow$ $q_1$ c | $q_2$ A | $q_3$c | C |
$q_2$ | $q_2$, A | $q_3$, c $q_2$A | $q_2$A | $q_3$c. | A |
$q_3$ | $q_1$, C | $q$ + , B $q_3$c | $q_1$c | $q_4$ B | C | | $q_4$ | q , , C | a + ,B q4 B | q , c | $q_4$ B | B |
Moore M/C
Equivalent Moore M/C.