GATE / CS ARCHIVE

GATE CSE 1998 / QUESTION 2.5

Minimum DFA remembering equal final bits

Theory of Computation · Finite Automata · Full GATE CSE 1998 paper

GATE 1998, Q2.5 2 marks · MCQ
Report issue

Finite Automata

Question 2.5, GATE 1998: Over{0, 1}, accept exactly words whose last two symbols are equal. Find minimum states among 2, 5, 8, 3.
Tap to enlarge
Your answer
Answer & solution

Answer: B: 5 (no official key was published)

Step through it (2 parts)

Use five states: start S; nonaccepting q0 for a last 0 without an equal final pair; nonaccepting q1 analogously; accepting a 0 for suffix 00; accepting a 1 for suffix 11. On0, S→q0, q0/a 0→a 0, q1/a 1→q0. On1 use the symmetric transitions. To prove minimality, accepting versus nonaccepting states differ on ε. a 0 and a 1 differ on suffix 0; q0 and q1 differ on 0; S differs from q0 on 0 and from q1 on 1. All five are reachable, so no merging is possible. Therefore B.

Original paper, page 4