2
$\begingroup$

I have a circuit and I should draw a moore diagram (state diagram) for that. ​ The problem is that every state can have 5 inputs and this makes the question hard for me. ​ I tried about 20 times to draw that diagram and every time I failed. ​ Can anyone help?

enter image description here

$\endgroup$
  • 1
    $\begingroup$ " I tried about 20 times to draw that diagram and every time I failed." -- What specifically did you try? (Are there even that many potential automata?!) How did you fail? The more specific your question, the more likely is it you'll get a helpful answer. Also, it is not clear what "a Moore diagram for a circuit" should be. An automaton? A truth table? What are the inputs and outputs? $\endgroup$ – Raphael Feb 4 '16 at 13:53
  • $\begingroup$ @raphael inputs are the keys and the output is the lamp. and about moore diagram, i mean something like this : american.cs.ucdavis.edu/academic/ecs154a/html.notes/moore.gif $\endgroup$ – Arman Malekzadeh Feb 4 '16 at 14:00
  • 1
    $\begingroup$ What's the input alphabet going to be? Are there 5 characters, each representing flipping one switch? $\endgroup$ – DylanSp Feb 4 '16 at 14:16
  • $\begingroup$ @DylanSp assume every state as a five digit number. the first letter from the left is for 5th key. if 5th key is connected, that letter is 1 and if it's not, the letter is 0. $\endgroup$ – Arman Malekzadeh Feb 4 '16 at 14:19
  • $\begingroup$ @ArmanMalekzade But then how do we handle inputs/transitions? We can't distinguish whether an input of 1 means to turn switch 1, 2, 3, 4, or 5 on. I'm assuming we'd use an input alphabet of $\alpha, \beta, \gamma, \delta, \zeta$ (using $\zeta$ instead of $\epsilon$ to distinguish it from the no-input transition), with each character representing one switch. $\endgroup$ – DylanSp Feb 4 '16 at 14:24
2
$\begingroup$

Don't try to draw the automata. Because there will be 32 states each having five transitions. Rather try to describe the transition function and output as hinted by DylanSp. i.e.

q01001 -> 1 -> q11001 (output 1), meaning if switches 2,5 are on and you put on switch 1, the lamp is lighted.

Another one. q11001->2->q10001 (output 0), meaning if switch 1,2 and 5 are on and you put off switch 2 than the lamp is unlighted.

I assume that input consists of a sequence of 1,2,3,4,5 indicating which switch is flipped. starting state is q00000. I assume, final state will be probably those transitions where lamp is lighted, if that is what you are trying to do.

$\endgroup$
  • $\begingroup$ you told me not to draw 32 states, but again what you're doing is working with 32 states ! $\endgroup$ – Arman Malekzadeh Feb 4 '16 at 14:44
  • $\begingroup$ Shreesh is saying to work out a table describing the transition function and output (which completely specifies the automata), but don't try to draw out all 32 states and their connection. $\endgroup$ – DylanSp Feb 4 '16 at 14:46
  • $\begingroup$ @DylanSp i understand, but what should i do with my teacher ? :)) $\endgroup$ – Arman Malekzadeh Feb 4 '16 at 14:49
  • $\begingroup$ @ArmanMalekzade Pull out your textbook's formal definition of a Moore machine; it should be something along the lines of the tuple $(S, S_0, \Sigma, \Lambda, T, G)$ where $S$ is the list of states, $S_0 \in S$ is the initial state, $\Sigma$ is the input alphabet, $\Lambda$ is the output alphabet, $T$ is the transition function, and $G$ is the output function. Then make clear that your table completely specifies all of these. $\endgroup$ – DylanSp Feb 4 '16 at 14:55
  • $\begingroup$ Giving a Moore machine as a 6-tuple is enough for any teacher. i.e. As $(S,S_0,\Sigma,\Lambda,T,G)$ according to Moore Machine $\endgroup$ – Shreesh Feb 4 '16 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.