Professional Documents
Culture Documents
Assignment 2
Perumalla Koteswara Rao (19307R020)
April 2, 2021
Question 1
Given a finite state machine with input variables x1,x2, state variables q1,q2,q3, and
output variables y1,y2.
1.Find the set of reachable states in this FSM starting from the initial state. Show
the set of states reachable in 1 step, 2 steps, and so on until you have found the full
reachable set.
Solution
Given Initial state(k=0) is q1=0,q2=0,q3=0,
A(q) = q1.q2.q3
The characteristic function is given by
1
The resultant function has q1’,q2’ and q3’ variables which should be replaced with q1,q2 and q3 to
calculate next state from the obtained state using the procedure as stated above.
The variables in next state function are replaced with present state variables and the set of states
in first step(k = 1) is given by
2
Second step(k=2):
Here,
∃x1, x2, x3, q1, q2, q3(q1.q2.q3 + q1.q2.q3).q10 ∧ (x1 ∧ x2).q20 ∧ (((x1.x2).q1) + x1 ∧ x2).q30 ∧ (q1 ∧ q2)
The variables in next state function are replaced with present state variables and the set of states
in second step(k=2) is given by
3
Third step(k=3):
Here,
The variables in next state function are replaced with present state variables and the set of states
in third step(k=3) is given by
4
Here, we can observe that set of reachable states in second and third steps i.e, R2(q) and R3(q) are
equal.So, the convergence has occurred.The set of reachable states for the FSM is shown below.
From this reachable states, we need to check for any combination of the input does the output
becomes 1 (y1=y2=1). So the characteristic function of the output function can be written as
∃x, qR3(q).χ(x, q, y)
5
Figure 5: Output function