The finite state machine (FSM) below has start state A and accepting state C. The input alphabet is {0, 1}.
(a) State whether the input 10101 is accepted. Justify your answer. [1]
(b) State whether the input 0110 is accepted. Justify your answer. [1]
(c) Describe the set of strings that this FSM accepts. [1]
(d) Write a regular expression that defines the same language as this FSM. [1]
- (a) Accepted – path A, A, B, C, B, C ends in the accepting state C (both the decision and the final state/path needed)(1)
- (b) Not accepted – path A, B, C, A, B ends in state B, which is not an accepting state (both the decision and the final state/path needed)(1)
- (c) All strings (of 0s and 1s) that end in 01; NE 'strings containing 01'(1)
- (d) (0|1)*01; accept any equivalent expression that matches exactly the strings ending in 01, e.g. (1|0)*01(1)
- Answer: (a) Accepted (ends in C) (b) Rejected (ends in B) (c) Strings ending in 01 (d) (0|1)*01
- Examiner tip: Always finish the trace and check whether the LAST state is accepting; passing through C earlier does not count.