Let L be the set of all binary strings whose last two symbols are the same.…
2020
Let L be the set of all binary strings whose last two symbols are the same. The number of states in the minimum state deterministic finite state automaton accepting language is ______.
- A.
2
- B.
5
- C.
8
- D.
3
Attempted by 117 students.
Show answer & explanation
Correct answer: B
The language requires strings to have a length >= 2 ending in 00 or 11. The minimal DFA needs 5 states:
Initial state (empty string)
Read a 0 (ends in 0)
Read a 1 (ends in 1)
Read 00 (Final state for 00)
Read 11 (Final state for 11)