In a mealy machine the output depends on the input as well as the present state. 2.3 State Diagram The State Diagram of the Vending Machine is given here. It has the following states: 1. State 1: reset 2. State 2: Five 3. State 3: Ten 4. State 4: Fifteen 5. State 5: Twenty 6. State 6: Twenty Five The next state is the Reset state again.