Here you can ask questions and find or give answers to organizational, academic and other questions about studying computer science.

1.1k questions

1.2k answers


538 users

0 votes

Given a FSM: A={2Vin,2Vout,I,2Vstate,R}A={2Vin,2Vout,I,2Vstate,R}
where Vin={a}Vin={a}Vout={o}Vout={o}Vstate={p,q}Vstate={p,q}I=I=p,


above FSM is given, I am wondering how to interpret R to draw state transition diagram? 

in # Study-Organisation (Master) by (770 points)

1 Answer

+1 vote

There are two inputs encoded by one boolean input variable a (which can be either true or false), and there are two outputs encoded by one boolean output variable o (which can be either true or false). Moreover, there are four possible states which are encoded by the four assignments to the two state variables p,q. 

The transitions are encoded as the satisfying assignments of the transition relation R where next(p) and next(q) denote the values of the state variable in the target state of a transition, while p and q encode the source state. If I am writing pX for next(p) and qX for next(q), the transition relation will be represented by the following BDD: 

This encodes the transitions with the corresponding inputs and outputs. 

Of course, you may also use any other method to determine the satisfying assignments of the given formula. For example, we can also compute an equivalent DNF like the following one: 

    p ∧ ¬a ∧ next(p) ∧ next(q) ∨ 
    p ∧ q ∧ ¬a ∧ ¬o ∧ ¬next(p) ∧ next(q) ∨ 
    p ∧ ¬a ∧ o ∧ ¬next(p) ∧ next(q)

Note that whenever a variable is not mentioned in one of the cubes above, it is a don't care. Expanding the DNF into full midterms, it will look as follows:

    p ∧ ¬q ∧ ¬a ∧ ¬o ∧  next(p) ∧ next(q) ∨
    p ∧ ¬q ∧ ¬a ∧  o ∧  next(p) ∧ next(q) ∨
    p ∧ ¬q ∧ ¬a ∧  o ∧ ¬next(p) ∧ next(q) ∨
    p ∧  q ∧ ¬a ∧  o ∧  next(p) ∧ next(q) ∨
    p ∧  q ∧ ¬a ∧  o ∧ ¬next(p) ∧ next(q) ∨
    p ∧  q ∧ ¬a ∧ ¬o ∧  next(p) ∧ next(q) ∨
    p ∧  q ∧ ¬a ∧ ¬o ∧ ¬next(p) ∧ next(q)

Hence, we find the following transition diagram (I hope that I read !p as the initial states correctly, otherwise, you need to adapt the initial states accordingly):

by (166k points)
edited by
Thanks for your answer. I am still blur how from given R you drew 1st diagram to get 2nd diagram, you may elaborate using other way? btw initial state is p
I have added now DNFs to compute the satisfying assignments of the transition relation (which are the transitions). Sorry, for using !p as initial states, but I could not read that from your question since it contains strange symbols.

Related questions

0 votes
1 answer
0 votes
1 answer
+1 vote
1 answer
asked Aug 18, 2018 in * TF "Emb. Sys. and Rob." by a_ (350 points)
Imprint | Privacy Policy