views:

34

answers:

2
+1  Q: 

Mealy v/s. Moore

What is the difference between Mealy & Moore type of finite state machines?

+2  A: 

Moore machine output is a function only of the state of the machine, Mealy machine output is a function of the state of the machine and its inputs.

Orbit
+2  A: 

In a Moore machine the output produced is associated to the current state of the machine and on it only. In a Mealy machine, instead, it is associated to both a state and a specific input.

From a practical point of view you have that output is placed on states in a Moore machine (so every state has its ouput), while on the latter you have outputs on transitions (so an ouput is decided from the current state AND the outgoing transition)

Jack
Can one type always be converted to the other?
Kedar Soparkar
Not from a theoretical point of view. From a practical point of view the output function in a Moore machine is a function `state -> output` while in a Mealy is `state, input -> output`. This means that if you explode every state of your Mealy machine adding the specific input for every outgoing transition you can simulate the same behaviour also if it's conceptually different.
Jack