I have the following state transition diagram from the tool. From this, I have to submit the answer in explicit form.
Given a FSM: A={2Vin,2Vout,I,2Vstate,R}
where Vin={a} Vout={o} Vstate={p,q}, I=(q->p|p),
R=(next(q)&q->a)&!(o|p|next(p))
My answer was:
init 0,1,4;
transitions
(0,{},{},0); (0,{},{},2); (0,{a},{},0); (0,{a},{},2); (2,{a},{},0); (2,{a},{},2); (2,{},{},2); (2,{},{},0);
The system is say it is wrong. Do I need to mention the deadends as initial states or I should not?
Or am I in the wrong direction completely?