GATE 2021 CS – Question 48
Consider the following language.
$L = \{w \in \{0,1\}^* \mid w \text{ ends with the substring } 011\}$
Which one of the following deterministic finite automata accepts $L$?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (D) Four-state chain where the accepting state goes on 1 back to the start state and on 0 to q1 (figure D)
Explanation
After reading 011 the DFA is in the accepting state. A further 1 makes the suffix 111, which has no useful prefix of 011, so it returns to the start state. A further 0 goes to the '0' state. Only D does this correctly.