Given the following state table of an FSM with two states A and B, one input and one output: If the initial state is A = 0, B=0, what is the minimum length of an input string which will take the machine to the state A=0, B=1 with Output=1?

📖 Explanation
To find the minimum length of an input string, we need to trace the state transitions starting from the initial state (A=0, B=0) until the target state (A=0, B=1) is reached with an output of 1.
Let's denote the state as (A, B).
Initial state: (0,0).
Target: Reach state (0,1) with Output =1 on the final transition.
-
From initial state (0,0):
- If Input = 0: Next state is (0,0), Output is 1. (Output is 1, but next state is not (0,1)).
- If Input = 1: Next state is (0,1), Output is 0. (Next state is (0,1), but output is not 1).
Neither a length 1 input satisfies all conditions.
-
Consider paths of length 2:
- Input "00": (0,0)0(0,0) (Output 1) 0(0,0) (Output 1). Final state is (0,0), not (0,1).
- Input "01": (0,0)0(0,0) (Output 1) 1(0,1) (Output 0). Final output is 0, not 1.
- Input "10": (0,0)1(0,1) (Output 0) 0(1,0) (Output 0). Final state is (1,0), not (0,1), and output is 0.
- Input "11": (0,0)1(0,1) (Output 0) 1(0,0) (Output 1). Final state is (0,0), not (0,1).
No length 2 input satisfies all conditions.
-
Consider paths of length 3:
We need the final transition to be from a state (X,Y) with Input Z to (0,1) with Output 1.
Looking at the table, the only row that results inNext State A=0,Next State B=1, andOutput=1is:
Present State A=1,Present State B=0,Input=1,Next State A=0,Next State B=1,Output=1.
This means the last step must be from state (1,0) with input 1.Now we need to find the shortest path from the initial state (0,0) to state (1,0).
- Path: (0,0)1(0,1) (Output 0). (Length 1, current state (0,1)).
- From (0,1), to reach (1,0):
(0,1)0(1,0) (Output 0). (Length 1, current state (1,0)).
Combining these, we get the path:
(0,0)Input=’1’(0,1) (Output 0)
Input=’0’(1,0) (Output 0)
Input=’1’(0,1) (Output 1)The input string is "101".
The final state is (0,1) and the output of the last transition is 1. The length of this input string is 3.
Since no shorter paths satisfied the conditions, the minimum length is 3.
The final answer is A















