GATE / CS ARCHIVE

GATE CSE 2011 / QUESTION 45

Minimizing a five-state DFA

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

GATE 2011, Q45 2 marks · MCQ
Report issue

Finite Automata

Question 45, GATE 2011: DFA D has alphabet {a,b}, start p, accepting states s,t, and transitions p:a→s,b→q; q:a→t,b→r; r:a,b→r; s:a,b→s; t:a,b→t. Which supplied machine is an equivalent minimal DFA? Unlisted states in the alternatives are nonaccepting.

(A) Start p; final s; p:a→s,b→q; q:a→s,b→r; r:a,b→r; s:a,b→s
(B) Start p; finals q,r; p:a,b→q; q:a→r,b→s; r:a,b→r; s:a,b→s
(C) Start p; final q; p:a,b→q; q:a,b→q and also q:b→r; r:a,b→r
(D) Start p; final s; p:a→s,b→q; q:a→s,b→q; s:a,b→s
Tap to enlarge
Your answer
Answer & solution

Official answer: A

The accepting states s and t both loop on a and b, so their right languages are identical and they merge. The other states p, q and r remain distinct: p versus q is distinguished by suffix ba, since p accepts ba while q reaches the dead state; q versus r is distinguished by a; p versus r is also distinguished by a. Any accepting state differs from these nonaccepting states on epsilon. All four resulting classes are reachable. The minimal DFA has classes {p}, {q}, {r}, {s, t}, with p --b--> q --b--> r, r a/b-loops, and a-transitions from p and q to the accepting sink. This is option A.

All five original states are reachable: epsilon reaches p, b reaches q, bb reaches r, a reaches s, and ba reaches t. Initially separate accepting {s,t} from rejecting {p,q,r}; r differs because its a-transition stays rejecting, and then p differs from q because their b-transitions lead to different classes. Alternative B wrongly accepts b, C has two b-transitions from q and is not deterministic, and D accepts bba although the original reaches r on bb and must reject every continuation.

Original paper, page 12 · Answer key